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:
+2
-2
@@ -29,9 +29,9 @@ func CheckEmailInDB(email string) (bool, error) {
|
||||
|
||||
func GetUserIDFromEmail(email string) (string, error) {
|
||||
log.Print(email)
|
||||
query := `SELECT user_id
|
||||
query := `SELECT users_id
|
||||
FROM (
|
||||
SELECT user_id, 1 AS priority
|
||||
SELECT users_id, 1 AS priority
|
||||
FROM users
|
||||
WHERE email_address = ?
|
||||
AND is_deleted = 0
|
||||
|
||||
Reference in New Issue
Block a user