Hi everyone, I have a Flutter app where I’m trying to implement logout functionality using the Auth0 SDK for Flutter. I have followed all the available guides but can’t seem to find anything that helps me. In my Flutter code, I have this for logging the user out:
await auth0.webAuthentication(scheme: “demo”).logout(
returnTo: ‘demo://my-auth-domain.auth0.com/android/com.example.abc/logout’,
useHTTPS: true,
);
The browser opens up, and a blank screen appears. When I check the logs in Auth0, I see Success Logout - User successfully logged out
, but the user is not redirected back to my app. The blank white screen just stays there.
I would like the line right after
await auth0.webAuthentication(scheme: “demo”).logout(
returnTo: ‘demo://my-auth-domain.auth0.com/android/com.example.abc/logout’,
useHTTPS: true,
);
to be triggered so that I can clear the credentials from the app.
I have ensured that demo://my-auth-domain.auth0.com/android/com.example.abc/logout
matches the allowed logout URL in Auth0.
I have read online that I need to set something up in the AndroidManifest.xml
file, like this:
I hope someone can help me.