Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

flutter firebase get provider type

if (user != null) {
    for (final providerProfile in user.providerData) {
        // ID of the provider (google.com, apple.cpm, etc.)
        final provider = providerProfile.providerId;
        print(provider);
        if (provider == "password") print("Email + Password);

        // UID specific to the provider
        final uid = providerProfile.uid;

        // Name, email address, and profile photo URL
        final name = providerProfile.displayName;
        final emailAddress = providerProfile.email;
        final profilePhoto = providerProfile.photoURL;
    }
}
Source by firebase.flutter.dev #
 
PREVIOUS NEXT
Tagged: #flutter #firebase #provider #type
ADD COMMENT
Topic
Name
8+4 =