Skip to content

Commit

Permalink
fixed sub needs to be string
Browse files Browse the repository at this point in the history
  • Loading branch information
jhnnsrs committed Feb 18, 2025
1 parent ec27de8 commit c031333
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion karakter/oauth2/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def custom_token_generator(request, refresh_token=False):

request.claims = {
"type": app.authorization_grant_type,
"sub": user.id if user else None,
"sub": str(user.id) if user else None,
"preferred_username": user.username if user else None,
"roles": [group.name for group in user.groups.all()] if user else [],
"scope": " ".join(request.scopes),
Expand Down

0 comments on commit c031333

Please sign in to comment.