mirror of
https://github.com/christianselig/apollo-backend
synced 2024-12-22 14:25:28 +00:00
fix API refreshing tokens
This commit is contained in:
parent
2304015aac
commit
e0c18b8f79
1 changed files with 3 additions and 1 deletions
|
@ -34,8 +34,10 @@ func (app *application) upsertAccountHandler(w http.ResponseWriter, r *http.Requ
|
|||
|
||||
// Reset expiration timer
|
||||
a.ExpiresAt = time.Now().Unix() + 3540
|
||||
a.RefreshToken = tokens.RefreshToken
|
||||
a.AccessToken = tokens.AccessToken
|
||||
|
||||
ac = app.client.NewAuthenticatedClient(tokens.RefreshToken, tokens.AccessToken)
|
||||
ac = app.client.NewAuthenticatedClient(a.RefreshToken, a.AccessToken)
|
||||
me, err := ac.Me()
|
||||
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue