Add login to your Android application
You can log the user in using theWebAuthProvider.login method:
onSuccess callback.
See the Auth0.Android configuration for more options for the WebAuthProvider class.
Add logout to your Android application
To log the user out, call theWebAuthProvider.logout method. The result of logout will be supplied in the onSuccess callback.
This method removes the cookie that the browser set at authentication time, so it forces users to re-enter their credentials the next time they try to authenticate.
If the logout is cancelled, you might want to take the user back to where they were before attempting to log out.
Show the user’s profile
Use theAuthenticationAPIClient class to retrieve the user’s profile from Auth0. This requires:
- The as received during the login phase
- The
profilescope to include whenWebAuthProvider.loginis called - The
emailscope (if you want to retrieve the user’s email address)