Restoring Login State with Angular 9 and auth0-spa-js

Hi, I’ve been following the Angular quickstart to integrate Auth0 into my SPA app using the Google social connector. I can authenticate fine via Google and read the ID token claims. The problem is when I refresh the page, it doesn’t seem to be restoring the login state, and I need to login again. This behaviour seems to be the same in both my app and the Angular quickstart code.

How can I get my app to silently restore the user’s logged in state without prompting to re-authenticate?

Hey there!

Can I ask you to raise this as a GitHub issue in the quickstart repo so we can work on that directly with the repo maintainers? Thank you! Please share with us the issue link so we can ping them.

1 Like

Perfect I’ll ping repo maintainers in a few minutes!

1 Like

@konrad.sopala this is actually also a duplicate of https://github.com/auth0-samples/auth0-angular-samples/issues/197 It’s sort of blocking our trial of auth0 at the moment so it would be great if someone could reach out to Chris on that issue. We don’t seem to be the only ones having this problem.

Sure! I’ll let them know about it. They’ll get back to you as soon as they can

The issue doesn’t seem to happen for database username-password authentication, only the social media connectors I’ve tried so far, Google and Facebook.

Resolved by https://github.com/auth0-samples/auth0-angular-samples/issues/198#issuecomment-673460922

2 Likes

Perfect! Glad to hear that!

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