Hello everyone,
I’m looking for the correct method to logout user in ionic auth0 application.
First try:
`
this.auth.logout({ returnTo: callbackUri, localOnly: false });
`
It’s working on Google Chrome but not with an android device.
Second try:
this.auth
.buildLogoutUrl({ returnTo: callbackUri })
.pipe(
tap((url) => {
// Call the logout fuction, but only log out locally
this.auth.logout({ localOnly: true });
// Redirect to Auth0 using the Browser plugin, to clear the user’s session
Browser.open({ url });
})
)
.subscribe();
This method opens a new tab on google Chrome.
Open a blank page (for 2 sec and vanish) in android device but I have to quit the app and go back to see the changes.
My goal is to logout user and go back to auth0 custom login or my main page who has a guard and will redirects to auth0 login page.
Please help me