<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
System Status
Announcements
Announcements
Search
Search
Select Language
0D54z00008xJVAICA4Okta Classic EngineAPI Access ManagementAnswered2023-03-21T15:35:31.000Z2023-03-20T10:07:58.000Z2023-03-21T15:35:31.000Z

VikramM.69791 (Customer) asked a question.

Redirect after Login takes me to dev-xxxxx.okta.com instead of Application URL

I have a webpage, which is created on HTML/CSS and JavaScript. While Page loads, I place an API call to get User name and User Groups from dev-xxxx.okta.com, if it fails I have coded in JavaScript to Redirect to Okta for login and get back to the webpage post authentication.

The problem is, the redirect do not work. Post login, and authentication, it takes me to https://dev-xxxx.okta.com dashboard.

I am new to Okta development and not sure what is it that I am doing is wrong.

If I was already logged in and have a active session in https://dev-xxxx.okta.com, then the page loads good with user name fetched and displayed properly.

 

I used the example from https://developer.okta.com/blog/2018/06/08/add-authentication-to-any-web-page-in-10-minutes and used the widget API call to get the user details and user group.

And below is the JavaScript authentication to Okta redirect step I am following.

 

window.location.assign('https://dev-xxxxxx.okta.com/oauth2/v1/authorize?redirect_uri=http://customdsn.organization.com:433');

 

Any help here is much appreciated

 


This question is closed.
Loading
Redirect after Login takes me to dev-xxxxx.okta.com instead of Application URL
Okta Support Agent (Beta)

Terms of Service

Hello! I'm the Okta Support Agent (Beta), your go-to resource for questions about Okta products. Please remember for your security and privacy, do not share any Personally Identifiable Information (PII) such as passwords, IP addresses, or other details with me.

Okta Privacy Policy and Terms of Service apply