fix: rotate refresh token
This commit is contained in:
parent
fd9eb7c733
commit
7136ee924d
|
@ -143,6 +143,8 @@ func TokenHandler() gin.HandlerFunc {
|
||||||
userID = claims["sub"].(string)
|
userID = claims["sub"].(string)
|
||||||
roles = claims["roles"].([]string)
|
roles = claims["roles"].([]string)
|
||||||
scope = claims["scope"].([]string)
|
scope = claims["scope"].([]string)
|
||||||
|
// remove older refresh token and rotate it for security
|
||||||
|
sessionstore.RemoveState(refreshToken)
|
||||||
}
|
}
|
||||||
|
|
||||||
user, err := db.Provider.GetUserByID(userID)
|
user, err := db.Provider.GetUserByID(userID)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user