Skip to content

feat: modify auth token url based on instance param #260

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

Merged
merged 43 commits into from
Nov 29, 2024

Conversation

cmars
Copy link
Contributor

@cmars cmars commented Oct 9, 2024

If an instance parameter is provided in the redirect, use it to modify
the URL from where the oauth token is obtained.

The instance provided is the Snyk region domain, minus the api. host
prefix.

Stacked on #258

@cmars cmars force-pushed the feat/redirect-with-instance-param branch 4 times, most recently from 26d7b95 to 345bc9e Compare October 9, 2024 21:42
@thisislawatts thisislawatts force-pushed the feat/redirect-with-instance-param branch 6 times, most recently from f6cfded to 8323cb4 Compare November 26, 2024 18:18
@thisislawatts thisislawatts marked this pull request as ready for review November 27, 2024 12:19
@thisislawatts thisislawatts requested review from a team as code owners November 27, 2024 12:19
cmars and others added 15 commits November 28, 2024 16:20
Snyk's OAuth implementation is capable of indicating the environment
which the user is authenticated into and authorized to access.

This is specified in the audience JWT claim ("aud"). Snyk's
implementation of this claim contains an array of strings, per RFC 7519.

If set and non-empty, the first audience URL is taken as the default API
URL that the client should use, unless the endpoint was specifically
configured.
It's a test JWT created on jwt.io for testing the parsing of claims
and cannot be used as a valid authorization anywhere.
If an instance parameter is provided in the redirect, use it to modify
the URL from where the oauth token is obtained.

The instance provided is the Snyk region domain, minus the api. host
prefix.
* test hygiene
* reduce size of authenticateWithAuthorizationCode
@PeterSchafer PeterSchafer merged commit d5da1e7 into main Nov 29, 2024
9 checks passed
@PeterSchafer PeterSchafer deleted the feat/redirect-with-instance-param branch November 29, 2024 16:19
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.

5 participants