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

When implementing Google Sign-In on iOS, is it possible to indicate in the google account sign-in popup that only email address will be used? #458

Open
jin-jobs opened this issue Jul 17, 2024 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jin-jobs
Copy link

Describe the bug
When implementing Google Sign-In on iOS, is it possible to indicate in the google account sign-in popup that only email address will be used?

To Reproduce
Steps to reproduce the behavior:

  1. Implement google sign in using GoogleSignIn-iOS library
  2. Build the app and press the google sign up button to proceed with the signup process.
  3. In the google account integration popup, you will see that “name, email address, profile picture” are accessible in the user's account.

Expected behavior
I only need the user's email address. I want the popup to show the user that it only uses the email address.
As I understand it, name, email address, profile picture are the default public information in google account. However, I will only use the user's email address in my app via google sign-up, and I want the popup to show only the email address.
Is this possible?

Screenshots
image

Environment

  • Device: any iPhone
  • OS: any iOS
  • Browser: N/A

Additional context
I've tested it without passing scope in the sign in request, and I've tested it with explicitly adding only userinfo.email as scope, but in both cases the sign-in popup shows that name, email address, profile picture are accessible. I want only the email address to be marked as accessible.

let additionalScopes = ["https://www.googleapis.com/auth/userinfo.email"] 
GIDSignIn.sharedInstance.configuration = config
GIDSignIn.sharedInstance
  .signIn(withPresenting: rootViewController, hint: nil, additionalScopes: additionalScopes) { 
      ...
   }
@jin-jobs jin-jobs added bug Something isn't working triage Issues that need to be triaged labels Jul 17, 2024
@mdmathias
Copy link
Collaborator

By default, GSI requests includes email and profiles scopes. You can see that here, and here.

So, this behavior is "works as intended." We can leave this issue open to see if folks would like an option only get the email scope.

@mdmathias mdmathias added enhancement New feature or request good first issue Good for newcomers and removed bug Something isn't working triage Issues that need to be triaged labels Jul 30, 2024
@mdmathias
Copy link
Collaborator

I'll also share that this feature would be a fairly straightforward thing to add, and we could help with reviews, etc.

@jin-jobs
Copy link
Author

Thank you for your review. We need this feature in our service and are making the suggestions above.
I hope you will consider this proposal positively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants