1

I have an application which requests that Google authorize it for basic profile and email permissions via Oauth1. If I clear all cookies and repeat the process, I am again prompted to authorize the application.

According to https://developers.google.com/accounts/docs/OAuth2Login:

If your repeat this process, you will not see the consent screen. Google remembers your consent, and simply issues a new access token to the site. If, for some reason, you'd like to reprompt the user for consent, you can add approval_prompt=force to the parameters in the request.

Am I being prompted because

  1. I'm using Oauth1 and not Oauth2?
  2. Some other reason (Maybe I haven't given enough information to tell why)

Note that stack overflow itself does not exhibit this behavior, so I know this should be possible.

4

1 回答 1

1

您可能会在几件事上得到“提示”。首先,输入您的凭据以登录。如果您清除 cookie,系统将提示您输入用户名和密码。OAuth 1 或 2 会发生这种情况。但要回答您的问题,我们不支持 OAuth1 授权的自动批准。您应该保留您的访问令牌,并且不必重新提示用户继续 API 访问。

这是我添加标准免责声明的地方,如果您应该强烈考虑使用 OAuth2 而不是 OAuth1。我们已弃用 OAuth1。OAuth 2 更容易编码,并且用户体验得到了很大改善。

于 2013-02-01T21:40:43.500 回答