Skip to content
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

customAuth requires user and pass in credentials #1584

Closed
bugslifesolutions opened this issue Oct 21, 2023 · 1 comment · Fixed by #1585
Closed

customAuth requires user and pass in credentials #1584

bugslifesolutions opened this issue Oct 21, 2023 · 1 comment · Fixed by #1585

Comments

@bugslifesolutions
Copy link

       if (this._authMethod !== 'XOAUTH2' && (!this._auth.credentials || !this._auth.credentials.user || !this._auth.credentials.pass)) {
            if (this._auth.user && this._auth.pass) {
                this._auth.credentials = {
                    user: this._auth.user,
                    pass: this._auth.pass,
                    options: this._auth.options
                };
            } else {
                return callback(this._formatError('Missing credentials for "' + this._authMethod + '"', 'EAUTH', false, 'API'));
            }
        }

It seems the intent of the customAuth feature is to permit custom authentication with custom options and therefore the provided options should satisfy the constraints vs throwing a Missing credentials error when user and pass are not provided.

@andris9
Copy link
Member

andris9 commented Oct 21, 2023

Yes, you are correct. With customAuth these properties should not be required, I’ll look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants