GoogleSignIn-iOS
GoogleSignIn-iOS copied to clipboard
How to add prompt: consent to user auth flow?
We need the user to consent on every login attempt and on web you can set prompt = consent. However, I'm having a difficult time trying to achieve this on mobile. Is this implemented and if so, can someone help provide guidance on how to implement this?
Currently, we're doing:
private lazy var configuration: GIDConfiguration = {
return GIDConfiguration(clientID: clientID, serverClientID: serverClientId)
}()
GIDSignIn.sharedInstance.signIn(with: configuration,
presenting: rootViewController) { user, error in
}
At the moment, it's not possible to set the prompt parameter via Google Sign-In. Can you tell me more about your use case here?
Apologies for the delayed response. The reason we want this is if the user initially declines certain scopes and then later wants to enable those scopes, they're unable to right now.
Any update on this ?
@petea there was a similar request in the Flutter issue tracker for prompt=select_account for internal user types (https://stackoverflow.com/a/58413506). https://github.com/flutter/flutter/issues/106544 and https://github.com/google/GoogleSignIn-iOS/compare/main...umbrellait-timur-khismatullin:fix-internal-mode-reauth-issue
Would you prefer a new issue for that, or does this include just setting valid prompt
values?
Would you prefer a new issue for that, or does this include just setting valid
prompt
values?
I just want to set prompt value.
Would you prefer a new issue for that, or does this include just setting valid
prompt
values?I just want to set prompt value.
I meant that question for @petea 🙂
Any update on this? prompt
is critical since if the user does not consent to permissions that enable auto refresh tokens. If the prompt is not set to consent, the user will essentially be asked to re-login every ~30min since there will be no refresh token available.