feat(auth): credentials on connect#17
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the public JS/TS connection API to accept broker credentials during connect, as part of adding authentication support on the JavaScript side (with native module support still pending).
Changes:
- Extend
ConnectionParameterswith optionalusernameandpassword.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| port: number; | ||
| clientId: string; | ||
| reconnect: boolean; | ||
| username?: string; | ||
| password?: string; |
There was a problem hiding this comment.
username/password are now exposed as part of the public ConnectionParameters, but the current native connect implementations (Android/iOS) don’t read these fields and still require a TLS identity to be configured. As-is, callers can pass credentials with no effect (or still get "no identity is configured"), which makes the JS API misleading. Consider either (a) documenting these fields here as "not yet supported by native modules" / "planned", or (b) rejecting at runtime when credentials are provided until native support lands, to avoid silent no-op behavior.
FLEX-3333
The purpose of this PR is to add on js side the credentials. Needs to be completed with native modules support.