# Basic SSO not working

**URL:** <https://community.auth0.com/t/basic-sso-not-working/8637>\
**Category:** Get Help\
**Tags:** sso\
**Created:** [October 31, 2017, 8:01pm UTC](https://community.auth0.com/t/basic-sso-not-working/8637 "2017-10-31T20:01:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![david.asbury](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@david.asbury](https://community.auth0.com/u/david.asbury)\
**Post date:** [October 31, 2017, 8:01pm UTC](https://community.auth0.com/t/basic-sso-not-working/8637/1 "2017-10-31T20:01:35Z")

</div>

I’m trying to setup a simple SSO between two clients, and have set it up according to the instructions with compliant OIDC. I can call authorize() on the Auth0.js component, and get redirected to the login page correctly and can sign in, get the token and all is good.

However if I then call authorize() a second time, either in the same client or in a second client, I have to login again. It does not recognize that I am already logged in.

I understand there is a cookie that should tell the auth0 server I am already logged in and bypass the login screen - can someone help me out, or at least let me know the name of the cookie so I can check it is being set?

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [October 31, 2017, 10:24pm UTC](https://community.auth0.com/t/basic-sso-not-working/8637/2 "2017-10-31T22:24:36Z")

</div>

Technically the cookie name is an implementation detail and subject to change, however, for troubleshooting reasons you should check what cookies are being set for the domain `[your_auth0_domain].auth0.com` as that it’s where the authorization endpoint and subsequent login operation are performed. In particular, **at this time** you may want to at least check a cookie going by the name of `auth0` as a quick test proved that deleting it had an impact on the existing user session.

---

<div class="post-metadata">

**Author:** ![david.asbury](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@david.asbury](https://community.auth0.com/u/david.asbury)\
**Post date:** [October 31, 2017, 11:51pm UTC](https://community.auth0.com/t/basic-sso-not-working/8637/3 "2017-10-31T23:51:56Z")

</div>

Ah, I see what is happening now…  
It actually is logged in, but I am seeing the screen that says “Last time you logged in with” instead of being redirected straight back to the host app. This isn’t what I expected but seems is the default behaviour ([Seeing "Last time you logged in with" during authorization code grant for API - Auth0 Community](http://community.auth0.com/questions/2263/seeing-last-time-you-logged-in-with-during-authori))  
I see I can use prompt=“none” but this will fail if there is no active session - I guess I can then re-authorize without prompt=“none” but would be easier if I can disable the “Last time you logged in with” screen. Is this possible?

---

<div class="post-metadata">

**Author:** ![david.asbury](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@david.asbury](https://community.auth0.com/u/david.asbury)\
**Post date:** [November 1, 2017, 1:02am UTC](https://community.auth0.com/t/basic-sso-not-working/8637/4 "2017-11-01T01:02:30Z")

</div>

To answer my own question, I changed this to use slient login and it now works just as I expect  
This code is probably totally dodg, but it works for my test so I am happy 🙂  
public login(): void {  
this.mgr.checkSession({}, (err, authResult) =\> {  
console.log(‘checkSession’);  
console.log(err);  
console.log(authResult);  
if (err)  
{  
this.mgr.authorize();  
}  
else  
{  
// Set the time that the access token will expire at  
const expiresAt = JSON.stringify((authResult.expiresIn \* 1000) + new Date().getTime());  
localStorage.setItem(‘access\_token’, authResult.accessToken);  
localStorage.setItem(‘id\_token’, authResult.idToken);  
localStorage.setItem(‘expires\_at’, expiresAt);  
}  
});  
}

---

<div class="post-metadata">

**Author:** ![david.asbury](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@david.asbury](https://community.auth0.com/u/david.asbury)\
**Post date:** [November 1, 2017, 1:09am UTC](https://community.auth0.com/t/basic-sso-not-working/8637/5 "2017-11-01T01:09:45Z")

</div>

(Sorry about the formatting - tried many times to fix it but doesn’t seem to want to work)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:57am UTC](https://community.auth0.com/t/basic-sso-not-working/8637/6 "2018-03-02T05:57:14Z")

</div>


