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

fixes issuer validation when trailing slash is present #123

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

shubangmck
Copy link

@shubangmck shubangmck commented Oct 28, 2024

The issuer in the JWTVerifier config is used to construct the metadata URL and during verify, the issuer in the parsed JWT with trailing slashes can cause an issue

for example:

2024/10/28 22:19:48 verify err: the `Issuer` was not able to be validated. iss: https://dev-g15esy7pvm6rlcdt.us.auth0.com/ does not match https://dev-g15esy7pvm6rlcdt.us.auth0.com

Both the issuers are the same, except for the trailing slash

Workaround, pass the trailing slash in the Issuer section, but since a string concatenation is used to construct the metadataURL, a malformed URL will be generated

Solution: use url.Join to create the Metadata URL

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