How can I login into OKTA by passing parameters in URL


I want to login into OKTA by just passing the User Credentials in the URL.
I do not want to go to the OKTA login page instead of that I just want to bypass the Login page and directly login into my OKTA account.
Is there any way to do that thing?


One of the main reasons for using Okta is so your apps don’t have access to your user’s credentials, providing a more secure environment for them. If you’re passing your user’s credentials, that means your app has access to them.

I’m sure you have a good reason for wanting to do this. Can you explain your use case a bit more?

Hello @mraible,

I know this for the security purpose.
but actually we have the user credentials and our requirement is that we want to bypass the OKTA login with internal process and redirect to the other app (so that it gets auto logged in without user interference).

So if there is a way to do it through API. Please let me know. Thanks

You can use our Authentication API for this:

1 Like

I have gone through “Primary Authentication with Trusted Application” but it only returns whether the user is valid or not.
I want to login into OKTA account internally through api and redirect to the other app.

Can you please let me know which api is effective here, what the process I need to follow to achieve this.

@Pankaj_Thakur Matt is right. You would have to use the /authn endpoint to get a session token. Then you can pass the session token as a parameter depending on what kind of app you have, as shown in this doc

1 Like

@warren @mraible
It worked. :star_struck:
Thank you so much for your help.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.