Skip to content

Password is sent as 'null' instead of an empty string in Authorization header #1251

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
buchatsky opened this issue Aug 15, 2022 · 3 comments
Closed
Labels
bug For tagging faulty or unexpected behavior. investigation-needed Indication that the maintainer or involved community members may need to investigate more.

Comments

@buchatsky
Copy link

Describe the bug
When AuthConfig.useHttpBasicAuth is set to true and AuthConfig.dummyClientSecret is not specified, the password value in client_id:password pair is 'null' instead of an empty string ''. At least it is so with Authorization code flow.
This causes the browser to popup a login prompt as a result to 401 server response (e.g. OpenIddict does not treat null password as an empty one).

Expected behavior
'client_id:' instead of 'client_id:null'

Additional context
angular-oauth2-oidc: 13.0.1

@jeroenheijmans jeroenheijmans added bug For tagging faulty or unexpected behavior. investigation-needed Indication that the maintainer or involved community members may need to investigate more. labels Aug 15, 2022
@jeroenheijmans
Copy link
Collaborator

Seems like a li'l bug to me indeed.

What happens if you set dummyClientSecret to '' (empty string) instead of leaving it null or unspecified? Doesn't that solve the issue?

@buchatsky
Copy link
Author

@jeroenheijmans yes, setting dummyClientSecret to '' does work as a workaround

@manfredsteyer
Copy link
Owner

I'm setting the default value for dummyClientSecret beginning with v15.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For tagging faulty or unexpected behavior. investigation-needed Indication that the maintainer or involved community members may need to investigate more.
Projects
None yet
Development

No branches or pull requests

3 participants