providers/oauth2: cast user.pk to string when using it for token 'sub' value (#4570)
This commit is contained in:
parent
5044f8ce6d
commit
eb60bba0d5
|
@ -487,7 +487,7 @@ class RefreshToken(SerializerModel, ExpiringModel, BaseGrantModel):
|
|||
if self.provider.sub_mode == SubModes.HASHED_USER_ID:
|
||||
sub = user.uid
|
||||
elif self.provider.sub_mode == SubModes.USER_ID:
|
||||
sub = user.pk
|
||||
sub = str(user.pk)
|
||||
elif self.provider.sub_mode == SubModes.USER_EMAIL:
|
||||
sub = user.email
|
||||
elif self.provider.sub_mode == SubModes.USER_USERNAME:
|
||||
|
|
Reference in New Issue