英文:
Is Google OneTap compatible with Google APIs?
问题
我正在尝试创建一个Android应用程序,该应用程序将访问用户的Google日历,因此需要访问Google日历API。
为此,我需要对用户进行身份验证。据我所知,有两种不同的方法可以做到这一点,一种是使用Google的新OneTap API,另一种是使用传统的Google登录API。这是我第一次使用Google API,我有点困惑,我在项目中集成了OneTap,但我不太明白在哪里/如何继续。
我成功地集成了OneTap并获取到了idToken,但我在某处看到,最终允许我访问Google API的OAuth同意屏幕只能通过旧的传统Google登录API触发,有人能指导我正确的方向吗?将不胜感激!
英文:
I'm trying to create an android app that will access the user's Google Calendar, thereby needing access to the Google Calendar API.
To do so, I need to authenticate the user. As far as I know there are two different ways of doing so, Google's new OneTap API or with the legacy Google Sign-in API. This is my first time working with Google APi's and I'm a bit confused, I integrated OneTap in my project but I don't really understand where / how to continue.
I was able to integrate OneTap successfully and getting an idToken, but I read somewhere that the OAuth consent screen that ultimately allows me to access Google API's can only be triggered through the old legacy google sign on API, can anyone point me in the right direction? Would be super grateful!
答案1
得分: 0
找到答案后,我和一位在OneTap上工作的人联系了一下:目前不支持通过OAuth获取授权令牌,但据我所知,他们正在讨论将其添加到未来的计划中。
使用传统的Google Sign-in API,这将使您能够轻松澄清OAuth权限范围。我猜想OneTap Auth的支持可能会在不久的将来加入。
如果支持被添加,我会尽量在这个帖子中更新。
英文:
Found the answer myself after reaching someone working on OneTap: getting Authorization Tokens through OAuth is currently NOT supported but from what I have heard there is a discussion on adding it in the future.
Use the legacy Google Sign-in API, this will allow you to clarify OAuth scopes quite easily. I'm guessing that support for OneTap Auth is likely coming in the near future.
I will try to update this thread when support is added.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论