Detecting an active Okta session Skip to main content
https://support.okta.com/help/answers?id=906f0000000i07siac&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Mark SalangsangMark Salangsang 

Detecting an active Okta session

I've created a custom front-end login form for my organization. Currently, if the user logs into an app and then returns to the custom login form, they have to re-enter their credentials. Is there a way to detect if there's an active Okta session when this login page is visited?
Joe ShawnJoe Shawn
Hi Mark,

Please see the below link. It gives you all the details which will help you detect an active session.

http://developer.okta.com/docs/api/resources/sessions

Regards,

Anurag
Gaal, Robin 416468Gaal, Robin 416468
You can also use Cors and call the '/api/v1/users/me' endpoint from javascript. If you have a valid okta sessions (including a sessioncookie) this will return a valid response. http://developer.okta.com/docs/api/getting_started/enabling_cors