okta / okta-angular

Angular SDK for Okta's OIDC flow
https://github.com/okta/okta-angular
Other
45 stars 31 forks source link

Okta Angular can't create a new session when in incognito mode #18

Open ghost opened 3 years ago

ghost commented 3 years ago

Everything works normally but I can't create SSO session when using incognito mode. Can anyone tell me why and how could I solve it?

I'm using the latest version of okta-angular and okta-signin-widget

oleksandrpravosudko-okta commented 3 years ago

Thanks for reaching out @thuannh1027

A small clarification - are you having multiple apps under the same domain which fail to provide SSO experience when running incognito? (i.e. what are the symptoms of SSO session not being created).

aarongranick-okta commented 3 years ago

@thuannh1027 A couple questions

ghost commented 3 years ago

Thanks for reaching out @thuannh1027

A small clarification - are you having multiple apps under the same domain which fail to provide SSO experience when running incognito? (i.e. what are the symptoms of SSO session not being created).

I have a Salesforce app and an Angular app. Both are using Okta as an identity provider. Without incognito mode, after login successfully, I could use /session/me to check the session and also redirect to Salesforce app by embedded link.

However, in incognito mode, when trying hit /session/me, it returns 404 and I cant redirect to Salesforce app. I did receive tokens from Okta but not sessionToken

oleksandrpravosudko-okta commented 3 years ago

Thanks for the details.

This might be happening b/c of cookie policy setting:

Screenshot 2021-01-18 at 10 38 02

If that is the case, session cookie 'sid' is not set for Okta tenant domain (see KB post for similar issue in IE11).

shuowu commented 3 years ago

@thuannh1027 Does @oleksandrpravosudko-okta 's comment help?