
zagid (zagid) asked a question.
On first time login I want to verify if okta sso session is active and if not redirect to a Custom sign in screen
i have create new instance but it is empty on first load When sso was active
var authClient = new OktaAuth({
url: 'https://${yourOktaDomain}',
clientId: '${clientId}',
redirectUri: 'http://localhost:8080'
});
Which api should I call? To check if sso is active and redirect to custom sign in screen only if not..

Hi @zagid (zagid) , Thank you for reaching out to the Okta Community!
Please review the following resources for any relevant information:
https://developer.okta.com/code/react/
https://developer.okta.com/docs/guides/sign-into-spa-redirect/react/main/#create-an-okta-integration-for-your-app
https://devforum.okta.com/t/signinwithredirect-how-to-choose-where-to-redirect-to/16061/10
For any other developer related questions, please reach out to the dedicated Developer Forum devforum.okta.com to take advantage of their expertise.
While we'll do our best to answer all of your questions here, this medium is more inclined towards Okta core products and features (non-developer work).
If my answers helped, remember to mark it as best to increase its visibility for other members of the Okta Community who might have the same questions as you.
Hope my answer helps!
--------------------------------
Community members help others by clicking Like or Select as Best on responses. Try it today.
I am using authclient.session.exists() to check if Okta session already exists. Getting 404 error.. I think it is CORS error.. can you please suggest a fix?@Mihai N. (Okta, Inc.)
It’s working fine now.. no fix required
thank you for the help