refresh token update
This commit is contained in:
parent
54c75f24e1
commit
e02a05c254
@ -179,9 +179,15 @@ func (s *Service) LoginRefresh(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
new_refresh_token, err := jwt.NewWithClaims(&jwt.SigningMethodEd25519{}, NewJWTRefreshToken(claims.AccountId)).SignedString(s.SessionKey)
|
||||||
|
if err != nil {
|
||||||
|
c.AbortWithError(http.StatusInternalServerError, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
c.JSON(http.StatusOK, LoginResponse{
|
c.JSON(http.StatusOK, LoginResponse{
|
||||||
Token: token,
|
Token: token,
|
||||||
RefreshToken: refresh_token.Raw,
|
RefreshToken: new_refresh_token,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user