Hi everyone Could you please help me? I logged in ...
# general
e
Hi everyone Could you please help me? I logged in via ory registration link https://.../ui/registration As a result, I got a session in ory But if I want to go through the oauth 2.0 flow via url like "https://.../oauth2/auth?audience=...&client_id=...&redirect_uri=...&response_type=code&scope=openid+profile+offline_access+email&state=..." For some reason it opens the login page (although there is already a session)
Context of my task: I have a full implementation of OIDC The page http://localhost:8080/home is under authorization for me, if I go to it, the login page opens -> login/registration -> the "home" page opens. But the "Don't have an account? Sign up" option on the login page looks very inconspicuous, so I want to have 2 buttons on the site - one "login" and the second "register" I found the Post-Registration Redirect option, configured it Then I went to the URL https://.../ui/registration -> registered -> a redirect to "/home" occurred -> since my service cookie is not yet there, a redirect to the oauth URL(an example of which is above) occurred. And here I expect that since there is already a ory session, a redirect to the oauth callback url will immediately occur (it is happens if, for example, I am logged in to ory, but I don’t have my service’s cookie yet and I just go to the /home page), but in this case for some reason it doesn’t happen and the login page opens for me despite the already existing ory session
m
Hey @elegant-waiter-25841 Is this a first-party scenario? You might not even need OIDC for that use case. If it is just a matter of UI you can probably just change it there? Sessions are notoriously tricky if OAuth2 is involved, since there are basically 3 different "layers" of sessions 🤔 not sure what exactly is the cause in your case.
e
Unfortunately, my UI is not involved here Perhaps you have an idea why the callback for the authorization flow does not work immediately, but the page /login?flow=... opens? At the same time, if I open the page /login in the next tab, it will not open (and this is correct, since there is a session)
Or maybe there is a possibility to specify some CGI parameter for oauth url(https://.../oauth2/auth?...) to open the login page or the registration page first(because they have links to each other. The only question is which one to open first.). That would solve my problem.