I want to know if user is from Oauth for some function. Right now I'm using current session provider to know if user is created with OAuth or with email (which is not OAuth)
Session session = await account.getSession(sessionId: 'current');
if(session.provider == 'email') {
_userIsOAuth = false;
} else {
_userIsOAuth = true;
}
if (kDebugMode) {
print(session.provider);
print("User is Oauth: $userIsOAuth");
}
which so far, works. I just want to know if there are better way or Appwrite built-in to know. I checked the documents (OAuth2 docs) and don't see such thing.
Recommended threads
- Appwrite (Dart SDK) (for package_info_pl...
Hi team! Many Flutter plugins now need package_info_plus 10.x and device_info_plus 13.x, but appwrite 25.4.0 still constrains package_info_plus: >=8.0.2 <10.0...
- Custom domain for Google Auth
Hello! I connected my custom domain to my Appwrite project, but I can't get the Google login/consent screen to show my domain instead of the Appwrite domain. I...
- Get Profile picture
If I made an app where user need to sign in with Google. Now how do I access the user profile picture?