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

Discovery Document Request does not use Discovery Policy Authority for Request Address #415

Open
RobK410 opened this issue Mar 8, 2024 · 0 comments

Comments

@RobK410
Copy link

RobK410 commented Mar 8, 2024

There exists a problem with the discovery document request when using with AWS Cognito (AWS's IdP) where the discovery Authority is different than the authority of the OAuth endpoints.

That is, AWS Cognito discovery endpoint authority will always be: "https://cognito-idp.{region}.amazonaws.com/"

And AWS Cognito default domain authority are: "https://{custom}.auth.{region}.amazoncognito.com"

The code in question is located here on line 401 of OidcClient.

This code change utilizes the Authority defined in the Discovery Policy instead of using the default Authority defined in the Client Options. Fallback is to use the Client Options Authority.

A proper solution is to check if a DiscoveryPolicy Authority has been specified, and use that instead of the Options.Authority when setting the Address property of the DiscoveryDocumentRequest.

@RobK410 RobK410 changed the title Discovery does not use Discovery Policy Authority Discovery Document Request does not use Discovery Policy Authority for Request Address Mar 8, 2024
RobK410 added a commit to RobK410/IdentityModel.OidcClient that referenced this issue Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant