Signing a User Out
This page shows you how to log your users out of your application
Using our logout function
We provide a simple logout function that signs out the currently logged in user. Here's how to use it:
Cotter cotter = new Cotter(apiKeyID: YOUR_API_KEY_ID);
void yourLogoutFunction() async {
await cotter.logOut();
_goToLoginPage(); // your own logic after logging out
}
What does `logOut` do ?
It clears out OAuth tokens inside the device's secure storage. The cleared out items include:
Access Token
Refresh Token
ID Token
Token Type
Last updated