Reputation: 1430
Did some searching and couldn't find exactly what I was looking for. Is there a way to determine if a user signed in with Apple (or really any other provider) in Firebase with Flutter? See the image below. Firebase knows it was an Apple sign in, but not sure how to check the provider to see if was Apple or another method.
Upvotes: 0
Views: 641
Reputation: 2048
You can access FirebaseUser property called providerData which type is List. UserInfo has a providerId which is for ex. google.com, facebook.com, apple.com, password (email) or phone.
You can find those values looking up the code.
print(user.providerData[0].providerId) // -> fe. google.com
Upvotes: 2