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

Okta doesn't redirect to the originating request #2

Open
martofeld opened this issue Jul 5, 2022 · 2 comments
Open

Okta doesn't redirect to the originating request #2

martofeld opened this issue Jul 5, 2022 · 2 comments

Comments

@martofeld
Copy link

Hey @GuiTeK!

This has been of great help to us as we are trying to deploy a similar infrastructure. The one issue that we are now seeing is that okta won't redirect to the originally requested URL but rather fall under index.html (expected given it's what the lambda handler redirects to when the /login endpoint is requested).

Have you guys run into this or are you okay with just being dropped in the index.html?

@lachlanatscalapay
Copy link

@martofeld did you end up finding a solution to this?

@nzspambot
Copy link

nzspambot commented Sep 29, 2022

@lachlanatscalapay and @martofeld its not very clear whats the best way to fix this but this is what I did to fix this was to use the state A source of good information was this https://stackoverflow.com/questions/55524480/should-dynamic-query-parameters-be-present-in-the-redirection-uri-for-an-oauth2 which mentions this

OAuth2.0 has a dedicated authorization request parameter for that purpose, which is "[state](https://www.rfc-editor.org/rfc/rfc6749#section-4.1.1)". The client should use it. The AS will append that state in the parameters of the redirect_uri when it issues the response, so the client will be able to find back this state inside the response.

So I could bubble the original URI through the login process

Hope this helps; let me know if you need any more detail. I needed this process BTW as I'm looking to expose objects in S3 as its not a website

Repository owner deleted a comment from dsudduth Feb 26, 2024
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

3 participants