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

fix: make issuer url validation follow the same check rules as the domain url validator #1291

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

thfsilvab
Copy link

Changes

This change makes the URL validation on getTokenIssuer at util.ts follow the same protocol validation rules as the function getDomain in the same file. I propose this change because, in case this library is used with other oauth providers, the issuer claim might have their protocol as http instead of https, resulting in this function appending https to an already well formed URL.

This is a problem that is actually impacting one of my applications in a development environment, the fix doesn't disrupt the current functionality but takes the validation that already exists for the domain URL. There are no UI changes, nor public API changes, only to one internal function.

A similar problem has been reported here before: https://community.auth0.com/t/invalid-id-token-issuer-iss-claim-mismatch-in-the-id-token/107904

If approved, I'd appreciate if this change could go in a patch release :)

References

Testing

  • This change adds unit test coverage
  • This change adds integration test coverage
  • This change has been tested on the latest version of the platform/language

Checklist

@thfsilvab thfsilvab changed the base branch from v1 to main August 8, 2024 20:31
@thfsilvab thfsilvab requested a review from a team as a code owner August 8, 2024 20:31
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 this pull request may close these issues.

1 participant