OAuth2.0 token strange behaviour (Invalid Credentials 401)

后端 未结 13 1654
無奈伤痛
無奈伤痛 2020-12-05 00:13

Usually, Google OAuth2.0 mechanism is working great.

  1. The user confirms permission to access Google account with selected scopes.
  2. The refresh token is
13条回答
  •  天涯浪人
    2020-12-05 00:25

    I had this problem when I tried experimenting with changing the redirect url in google console and then updating my json credentials file on server. I had to clear the session variables before starting afresh. So in your project just do this once:

    session_start(); //starts a session
    session_unset(); //flushes out all the contents previously set
    

    Remember to remove the session_unset() after dry running it once.

提交回复
热议问题