google / GoogleSignIn-iOS

Enables iOS and macOS apps to sign in with Google.
https://developers.google.com/identity/sign-in/ios
Apache License 2.0
472 stars 189 forks source link

Add extra_params argument to signin call #369

Open dan-gulliver opened 6 months ago

dan-gulliver commented 6 months ago

I wanted to set a custom prompt https://developers.google.com/identity/openid-connect/openid-connect#prompt in the request so that I can always show the Google account list instead of automatically use the logged-in user.

But I couldn't find a way to do it inside this library. What I saw is that AppAuth supports it by setting it in extraParams: https://github.com/openid/AppAuth-iOS/issues/6#issuecomment-298252225

The only problem is that I couldn't find a way to set these extraParams from outside of Google Sign in library. So I added an extra params argument to the signin function and internally set them inside AppAuth call.

google-cla[bot] commented 6 months ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.