Search code examples
google-apiaccess-tokenautologin

Is there way to login automatically using access_token?


I'm trying to let my application login automatically using access token.

So to explain in detail, user who've logged into google gave permission and my application stores access token. when user exit program, and come back again, I want to use stored access token to let user automatically logged into google using access token if possible would it be possible to do so?


Solution

  • This is unrelated to access tokens, which btw expire after 1 hour.
    If your application has set some cookie in your users browser you can remember them, and if you keep a valid refresh token there is no need to re-authenticate them. But this is not the most secure setup, better authenticate the user every time.