feat(auth): support multiple user roles in JWT and services
- Change JWT access token RoleID claim from int to []int to support multiple roles per user - Update all token generation and refresh logic to handle multiple role IDs as []int - Refactor services to return and process multiple role IDs from user_roles table - Fix OAuth state handling explanation and improve code comments - Clean up related function signatures and usages for consistency
This commit is contained in:
+1
-1
@@ -186,7 +186,7 @@ func validateSessionFromDB(sessionID string) (*models.JWTSession, error) {
|
||||
WHERE id = ? AND is_revoked = false
|
||||
`, sessionID).Scan(
|
||||
&session.ID,
|
||||
&session.UserID,
|
||||
&session.UsersID,
|
||||
&session.RefreshTokenHash,
|
||||
&session.UserAgent,
|
||||
&session.IPAddress,
|
||||
|
||||
Reference in New Issue
Block a user