fix(server): creepy @@ string split logic for auth_token

This commit is contained in:
Lakhan Samani
2022-11-13 01:22:21 +05:30
parent 9320f1cb07
commit 579899c397
12 changed files with 21 additions and 29 deletions

View File

@@ -197,8 +197,11 @@ func OAuthCallbackHandler() gin.HandlerFunc {
}
}
// TODO
// use stateValue to get code / nonce
// add code / nonce to id_token
nonce := uuid.New().String()
authToken, err := token.CreateAuthToken(ctx, user, inputRoles, scopes, provider, nonce)
authToken, err := token.CreateAuthToken(ctx, user, inputRoles, scopes, provider, nonce, "")
if err != nil {
log.Debug("Failed to create auth token: ", err)
ctx.JSON(500, gin.H{"error": err.Error()})