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

Issuers with trailing slashes #106

Open
bquackie opened this issue Sep 7, 2023 · 3 comments
Open

Issuers with trailing slashes #106

bquackie opened this issue Sep 7, 2023 · 3 comments

Comments

@bquackie
Copy link

bquackie commented Sep 7, 2023

I have an issuer that has a trailing slash, e.g https://me.yous.com/. in the getMetaData() method, there is the concatenating of this line of code: metaDataUrl := j.Issuer + j.Discovery.GetWellKnownUrl() to create the path to the jwks. But, because of the extra /, the URL will be incorrect, e.g https://me.yous.com//.well-known/openid-configuration.

Is there any workaround for this?

using v1.3.1; it appears that I'd have the same issue with the latest, (v.2.0.3)

@duytiennguyen-okta
Copy link
Contributor

OKTA internal reference https://oktainc.atlassian.net/browse/OKTA-658720

@dbellinghoven
Copy link

I actually rolled my own version of this library which should solve this for you that you can find here. You can create your verifier with a trailing slash in the issuer string and it will still work correctly.

import (
    "github.com/dbellinghoven/okta-jwt-verifier"
)

func main() {
    ver := verifier.New("https://me.yous.com/")
}

@shubangmck
Copy link

Please merge my PR which solves the trailing slash issue
#123

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

4 participants