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

Added option for a redirect request for oauth login #68

Merged
merged 4 commits into from
Sep 26, 2024

Conversation

jonah-iden
Copy link
Contributor

When logging in via a oauth provider you can now add redirect=someurl in the url query to request to be redirected to some specific site instead of the default configured login success redirect url.
The redirect url has to be in the comma seperated list of whitlisted urls set through oct-redirect-uri-whitelist

How to test

  1. create a github oauth provider
  2. configure the oct server with the provider
  3. create the OCT_REDIRECT_URI_WHITELIST env-variable and add your uri
  4. start the server and open http://localhost:8100/api/login/github?token=sometoken&redirect=yourRedirectUri
  5. after login is successfull you should be redirected to the given uri.
  6. if the uri is not in the whitelist you should get an error

Copy link
Contributor

@spoenemann spoenemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Just a question and a request

Signed-off-by: Jonah Iden <[email protected]>
Signed-off-by: Jonah Iden <[email protected]>
@jonah-iden jonah-iden merged commit 86f2afd into main Sep 26, 2024
3 checks passed
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.

2 participants