logoutUser function
Logs out user (via universal login) on mobile.
Implementation
Future<void> logoutUser({
required String auth0Domain,
required String auth0ClientId,
required String redirectUri,
String? scheme,
}) async {
Auth0 auth0 = initAuth0Mobile(
auth0Domain,
auth0ClientId,
);
try {
scheme != null
? await auth0.webAuthentication(scheme: scheme).logout()
: await auth0.webAuthentication().logout();
} catch (e) {
throw Exception(e);
}
}