0

Hi please help providing answers on dealing with new Google Identity Service library access token using implicit flow.

  1. Everytime I refresh my app, it will prompt you to login. Is there a way to tell if user is logged in?

  2. The document doesn't mention how to store these access token? Please advise??

  3. Access token expires in 1 hour. There doesn't any documentation stating on how to extend the lifetime using refresh token. It's impossible to ask user to login every 1 hour, right??

These answers are not helpful at all: With Google Identity Services (GIS) JavaScript SDK, how do you extend a session?

Google Identity Services : How to refresh access_token for Google API after one hour?

Google, please help to clarify these questions before the deadline on March 2023!!

[edit: I'm not sure why this question is marked as duplicate, as i can't find the answers on the linked duplicate question]

Realizt30
  • 173
  • 2
  • 12
  • Thank you for the answer. 1. I don't need to paste my code here because basically it's a concept question. My main concern is that my app calls the initTokenClient(). From previous library, I can check user's state whether user is login using isSignedIn function which has been deprecated. Now, how do I check if user has logged in so they don't need to login every time? 2. That is where the issue relies. The access token expires in 1 hour, how can I extend it without having user to login? 3. Similar to number 2. Please provide solution if refresh token is not supported on implicit flow – Realizt30 Nov 03 '22 at 13:57
  • Hi @DaImTo , since you duplicated my question. Could you at least help to answer on the other question's answer? https://stackoverflow.com/questions/72418822/google-identity-services-how-to-refresh-access-token-for-google-api-after-one/72459665#72459665 – Realizt30 Nov 03 '22 at 18:00
  • Nope, because as far as i know thats the best answer we have. Google has not been forth coming as to how to fix the issue. I havent had time to look into it yet myself. There are a pile of questions on the same subject [Search](https://stackoverflow.com/search?tab=newest&q=%5bgoogle-identity%5d%20%5bjavascript%5d%20refresh%20) if you find one that works let me know and i will see if we cant duplicate everything to that. – Linda Lawton - DaImTo Nov 03 '22 at 18:38

0 Answers0