How to make the angularjs app login automatically?

Hi Team,

I created two SPA applications with different client id.
The two angularJS application has different sub domain name like a.company.com and b.compnay.com.
When I login to a.compnay.com successfully, then open b.company.com, how can I make login automatically for b.compnay.com?

Thanks & Regards,
Lyle Xu

Provided both applications were created on the same Okta org, you can configure the applications to automatically log the user in if they have an existing Okta session.

If you’re using AuthJS, you can use the getWithoutPrompt method to make an authorize request for an already logged in user without prompting them to login again. Note that this method will only succeed if the user has an active Okta session, which if you want, you can check for with session.exists().

If you are not using AuthJS, both of these calls can be made manually instead by making an /authorize request with prompt=none and making a CORS request to /sessions/me, respectively.

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