Always “Have Offline Access” | Google OAuth 2

后端 未结 5 2158
忘掉有多难
忘掉有多难 2021-02-09 02:59

I am trying to get fetch user\'s profile using Google OAuth2 api. After user authentication, on the consent page, I am always asked for \"Have Offline Access\"

The URL i

5条回答
  •  清酒与你
    2021-02-09 03:14

    Looks like you have registered your client as a "Native Application" instead of a "Web Application". Native apps get a refresh token by default which is a long lived token, for which the Resource Owner gets a notification and a consent screen because of its inherent security implications. Change your client type to "Web Application" assuming that's what it is...

提交回复
热议问题