Hi there,
I am working on an Angular 6 App and trying to implement Single Sign On with one of our other app built on Webforms. I have done all the recommended steps required to enable SSO across different applications as recommended in “https://auth0.com/docs/sso/current/setup”. If i am logged in to the webforms app the single sign on is not working for the SPA as expected, as when i click on the login it redirects me login page asking for credentials. I am calling the recommended checkSession method but it gives me error of login_required, even though i can see the cookie is set. The webform application is hosted on SSL and the SPA is on my localhost, i am not sure if that is causing the issue. Below is the code that returns login_required. Has anyone faced similar issue
this.auth0.checkSession({
audience: ‘https://xxxx.auth0.com/api/v2/’,
scope: ‘read:order write:order’
}, (err, authResult) => {
if (authResult && authResult.accessToken) {
console.log(‘AuthService.handleAuthentication authenticated.’)
this.setSession(authResult);
this.router.navigate([‘/’]);
} else if (err) {
console.log(‘error’);
this.auth0.authorize();
}
});
Thanks