Skip to content

fix: Add warning when password is set without username #1989

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/lib/connect/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ function connect(
// merge in the auth options if supplied
parseAuthOptions(opts)

// if password is set without username, warn the user
// previously would fail silently
if (opts.password && !opts.username) {
console.warn("'password' option set without 'username' option")
}

// support clientId passed in the query string of the url
if (opts.query && typeof opts.query.clientId === 'string') {
opts.clientId = opts.query.clientId
Expand Down
Loading