第二个[[GIDSignIn sharedInstance]登录]没有提示用户 [英] Second [[GIDSignIn sharedInstance] signIn] isn't prompting the user

查看:76
本文介绍了第二个[[GIDSignIn sharedInstance]登录]没有提示用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

许多人拥有多个Google帐户.我想在我的应用程序中支持多个Google帐户.我在提示用户使用第二个帐户登录时遇到麻烦.

Many people have more than one Google account. I'd like to support multiple Google accounts in my app. I'm having trouble getting a prompt for the user to sign in with a second account.

用户可以正常登录一个帐户.第一次调用sign会导致调用具有所有期望值的委托.

The user can sign in to one account just fine. Calling sign in the first time results in a call to the delegate with all of the expected values.

当我再次调用登录时,我的应用程序不会切换到Google登录界面,而是会立即调用委托.返回给委托的值是第一个帐户的.从这个意义上讲,它就像signInSilently一样工作.

When I call signIn again, my app doesn't switch to the Google sign in UI but instead the delegate is called immediately. The values returned to the delegate are for the first account. In that sense, it's working like signInSilently.

我正在使用iOS Google登录ID版本2.1.0.我正在使用iOS模拟器.

I'm using the iOS Google Sign In SDK version 2.1.0. I'm using the iOS simulator.

登录sdk是否支持多个帐户?如果可以,怎么办?

Does the sign in sdk support more than one account? And if so, how?

我的首选行为是使登录始终提示用户登录.

My preferred behavior would be for signIn to always prompt the user to sign in.

推荐答案

在调用signIn之前调用signOut将再次弹出提示窗口.退出后,令牌(或至少刷新令牌)似乎仍然处于活动状态,因此仍然可以访问所有帐户.

Calling signOut before calling signIn will bring up the prompt window again. The token (or at least the refresh token) seems to still be active after signing out so access to all accounts is still possible.

这篇关于第二个[[GIDSignIn sharedInstance]登录]没有提示用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆