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

Subject in userinfo claims should be of type string #156

Open
robinvdvleuten opened this issue Sep 11, 2024 · 0 comments
Open

Subject in userinfo claims should be of type string #156

robinvdvleuten opened this issue Sep 11, 2024 · 0 comments

Comments

@robinvdvleuten
Copy link

Before spending time on a pull request, I wanted to raise it first as an issue to understand the reasoning behind it. An provider returns a normalized {:ok, userinfo_claims} according to the OpenID standard claims spec. One of these claims is the subject or sub and - according to the specs - should be of type string. Some providers return their subject as integer, and I would suspect that the normalize call would convert those to a string. But unfortunately, that is not the case and even appears as integer in the test cases (see https://github.com/pow-auth/assent/blob/main/test/assent/strategies/strava_test.exs#L56 for example).

Wouldn't it be more logical and according to the specs if the normalizer always return a string for the sub claim? If so, I would certainly help changing it in a PR.

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

No branches or pull requests

1 participant