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

OIDC flows doesn't respect return_to #332

Open
4 of 5 tasks
tozz opened this issue Jan 12, 2024 · 0 comments
Open
4 of 5 tasks

OIDC flows doesn't respect return_to #332

tozz opened this issue Jan 12, 2024 · 0 comments
Labels
bug Something is not working.

Comments

@tozz
Copy link

tozz commented Jan 12, 2024

Preflight checklist

Ory Network Project

https://auth-app-stage.gilion.com/

Describe the bug

We are implementing our own UI and it works well for logging in, signing up, etc. However, we have scenarios where a user has previously signed up with email/password and then tries to connect using Google (as an example). Ory detects this and wants the user to verify the connection, however, it's not possible to direct that experience off of the Ory account experience and the user gets redirected to that login view instead of ours.

Reproducing the bug

We run a simple Next app and start up the Ory CLI using ory tunnel http://localhost:3000 --dev (the correct ENV is set pointing to the project) we then create a new browser flow with fetch (because the Ory JS client wasn't working for us, with a lot of weirdness going on), that flow is created using return_to=http://localhost:3000 (which is whitelisted in the project settings).
The network requests are then as follows;
POST to http://localhost:4000/self-service/login?flow=... with provider set. It redirects to Google to handle their process.
Google then sends the user to https://optimistic-snyder-xxx.projects.oryapis.com/self-service/methods/oidc/callback/google which in turns send the user to http://localhost:4000/self-service/methods/oidc/callback/google which in turn sends them to http://localhost:4000/ui/login, hence our issue.

Relevant log output

No response

Relevant configuration

No response

Version

0.3.1

On which operating system are you observing this issue?

macOS

In which environment are you deploying?

None

Additional Context

No response

@tozz tozz added the bug Something is not working. label Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

No branches or pull requests

1 participant