-
I'm building an app where I depend and on third party data (spotify and google) and therefore authenticate to them via ory so that I don't need to implement this by myself. As I can just get the initial_access_token (and refresh_token) it seems I would need to refresh them by myself. That would be possible but is there are way to avoid this? But the main problem is that I don't get a refresh token from google. Am I doing something wrong or isn't that possible. That would render the google integration useless for me. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Hello @TPausL Once the user did the initial signup with that provider, Ory Identities exchanges the tokens from e.g. Google for ones created by Ory. What was the use case for getting the OIDC tokens multiple times? Are you building a webapp or mobile/native? |
Beta Was this translation helpful? Give feedback.
Hey @TPausL
apologies for the late answer!
You should be able to get the refresh token and use it to get a working access token as documented here:
https://www.ory.sh/docs/kratos/social-signin/get-tokens
The refresh token you get should be long-lived, I am not sure how it exactly plays out with Google.
I will have a look if I find more information for this exact use case.
This feature might also be interesting to you longer-term: ory/kratos#1912