Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Firebase Auth] Signin with Apple does not provide email and fullName. How to retreive them using firebase? #9836

Closed
ExpertKiD opened this issue Nov 1, 2022 · 1 comment
Labels
good first issue Good for newcomers resolution: duplicate This issue or pull request already exists type: documentation Improvements or additions to documentation

Comments

@ExpertKiD
Copy link

ExpertKiD commented Nov 1, 2022

Hi, I am trying to signinwith Apple on native platforms.

import 'package:firebase_auth/firebase_auth.dart';

Future<UserCredential> signInWithApple() async {
  final appleProvider = AppleAuthProvider();
  if (kIsWeb) {
    await FirebaseAuth.instance.signInWithPopup(appleProvider);
  } else {
    await FirebaseAuth.instance.signInWithProvider(appleProvider);
  }
}

Source: Firebase Federation Auth & Social Login

I have added scopes to appleProvider as well as below:

import 'package:firebase_auth/firebase_auth.dart';

Future<UserCredential> signInWithApple() async {
  final appleProvider = AppleAuthProvider();

    appleProvider.addScope('email');
    appleProvider.addScope('name');

  if (kIsWeb) {
    await FirebaseAuth.instance.signInWithPopup(appleProvider);
  } else {
    await FirebaseAuth.instance.signInWithProvider(appleProvider);
  }
}

Even still, I am only able to fetcha the email but no display name comes at all. How can I request for email and fullname for user? It is required for us to register a new user to our backend.

The documentation lacks the details on how to request those details.

@ExpertKiD ExpertKiD added good first issue Good for newcomers type: documentation Improvements or additions to documentation labels Nov 1, 2022
@darshankawar darshankawar added the triage Issue is currently being triaged. label Nov 1, 2022
@darshankawar
Copy link

I think this is similar to #9662 so please follow up in it for further updates.
Closing as duplicate. If you disagree, write in comments and I'll reopen it.

@darshankawar darshankawar added resolution: duplicate This issue or pull request already exists and removed triage Issue is currently being triaged. labels Nov 1, 2022
@firebase firebase locked and limited conversation to collaborators Dec 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers resolution: duplicate This issue or pull request already exists type: documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants