Google APIs Console - missing client secret

前端 未结 6 1951
借酒劲吻你
借酒劲吻你 2020-12-02 13:27

I tried to create a testing client id for an android app which uses OAUTH 2.0 as login for retrieving user profile. I followed the steps to complete the creation of the clie

6条回答
  •  庸人自扰
    2020-12-02 13:54

    It seems that Google finally ditched the unnecessary client_secret for installable applications and is not yet up-to-date with their documentation. You should check if you already get an access_token in the initial OAuth request like it's handled on Facebook.

    Another possibility would be to fall back to using a Simple API Access key.

    Update:

    First method seems to not work with Google.

    The recommended way for Android is to use AccountManager instead of baking your own requests. Follow this example to see how this is implemented and how you get an AuthToken using a Simple API Access key. Instead of using the Tasks API you can then include the OAuth2 API library to retrieve the userinfo.

提交回复
热议问题