angularx-social-login icon indicating copy to clipboard operation
angularx-social-login copied to clipboard

Logout not working after once the browser is refreshed

Open Nilbristi opened this issue 2 years ago • 1 comments

After successful login, I can enter my application and everything is working fine. But if I refresh the page and after that try to do socialLogout, I am getting an error. The plugin should auto-track the login status after a user refreshes the page.

The error I am getting below:

image

Nilbristi avatar Aug 20 '22 12:08 Nilbristi

Regarding Google Auth, this has me unsure how to proceed with the following scenario.

Every refresh of the browser requires the user to login again. You can listen to the authState using this.authService.authState.subscribe() but will not trigger unless the user clicks lthe login button again.

Scenario 1: If user logs in and the browser is never refreshed, if they signout of web app, then this.authService.signOut() works appropriately.

Scenario 2: If user logs in, then closes browser, then opens the browser/web app again, through web app's auth persistence, they are still logged in, but no longer logged in to google, so when they signout of web app, this.authService.signOut() fails with the error above.

Question, any methods/mechanisms to persist google auth when browser is refreshed? Instead of always being logged off when the browser is closed?

TIA

professor-rage avatar Aug 31 '22 18:08 professor-rage

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 01 '22 13:11 stale[bot]