mirror of
https://github.com/1f349/lavender.git
synced 2024-12-22 07:34:06 +00:00
Rollback sooner
This commit is contained in:
parent
b1fc0d59fe
commit
6717f11f02
@ -37,11 +37,11 @@ func generateIDToken(ti oauth2.TokenInfo, us *database.DB, key mjwt.Signer) (tok
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
defer tx.Rollback()
|
||||||
user, err := tx.GetUser(ti.GetUserID())
|
user, err := tx.GetUser(ti.GetUserID())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
tx.Rollback()
|
|
||||||
|
|
||||||
token, err = key.GenerateJwt(user.Sub, "", jwt.ClaimStrings{ti.GetClientID()}, ti.GetAccessExpiresIn(), &IdTokenClaims{Subject: user.Sub})
|
token, err = key.GenerateJwt(user.Sub, "", jwt.ClaimStrings{ti.GetClientID()}, ti.GetAccessExpiresIn(), &IdTokenClaims{Subject: user.Sub})
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user