Login page & staying logged in and redirect to app


#1

Hi,

I’m new to otka and I’m having a problem with oktas login page. I’m using oauth2 code flow and have setup custom login page subdomain (accounts.app)

Current flows:

www.app > User clicks login > Redirects to accounts.app > user enters user and pass > Redirects back to “www.app” with code”

So far all good, I’m able to receive code and authenticate the user passing the code to okta token endpoint and receive the token.

The problem I’m struggling to figure out now, is when the user now goes back to accounts.app.com, it shows the login form again with user and password field, however I would like it to automatically redirect the user back to “www.app” or some other custom domain/path. Is this possible to achieve?

I would really appreciate any hints or tips. Thanks!

Regards,
Mart.


#2

Hi @Mart

If you are referring to the Okta Custom Login page, I would suggest(without knowing your entire solution) you can configure the global default URI, so if a user has a valid session of Okta, he/she would be redirected to the Global default URI, if no redirect URI is present in the URL.
Hope it makes sense!