I am implementing authorization in a standard web application (golang) using authorization code flow. But the example(Auth0 Go SDK Quickstarts: Add Login to your Go web application) example does not show how to update access_token using refresh_tokens. Where can I find this example?
Welcome to the Auth0 Community!
I have reviewed the Auth0 Go SDK Quickstarts: Add Login to your Go web application and found that the callback.go
example demonstrates how to save the access token in session storage.
Specifically, it uses the session.Set()
and session.Save()
methods.
Here is an example:
session.Set("access_token", token.AccessToken)
session.Set("profile", profile)
if err := session.Save(); err != nil {
ctx.String(http.StatusInternalServerError, err.Error())
return
}
Therefore, you can use the same method to save the new access token generated from refresh tokens.
Let me know if you have any follow-up questions.
Thanks,
Rueben
Hi, thank you for your answer
This code doesn`t show how to work with refresh tokens (Refresh Tokens), how to update access token+refresh token pair using refresh token when access token is expired using golang SDK
Where can i found this example?
Thanks for the reply.
I have looked for an example and found one specifically for the Auth0 Golang SDK here. Please also refer to our Use Refresh Tokens documentation on how to use refresh tokens.
Thanks,
Rueben