refresh token #102
-
apologies for the silly question, but I haven't managed to figure it out yet. How do I get a fresh token (google strategy) once it expires? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
In the verify callback you pass to the GoogleStrategy when you instantiate you receive an access token, then a refresh token, then extra params from Google and finally the user profile. You can keep both the access token and refresh token and once you need to use the access token and it fails because it expired you can use the refresh token to get a new one and keep the new one. Doing that it's outside the scope of the package, you need to do that in your loaders or actions. |
Beta Was this translation helpful? Give feedback.
In the verify callback you pass to the GoogleStrategy when you instantiate you receive an access token, then a refresh token, then extra params from Google and finally the user profile.
You can keep both the access token and refresh token and once you need to use the access token and it fails because it expired you can use the refresh token to get a new one and keep the new one.
Doing that it's outside the scope of the package, you need to do that in your loaders or actions.