Skip to content

Commit

Permalink
Use given_name and family_name
Browse files Browse the repository at this point in the history
  • Loading branch information
CannonLock committed Aug 7, 2024
1 parent 168b595 commit a657f71
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/routes/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,11 @@ async def redirect_callback(code: str, state: Optional[str] = None):
user = await get_user(user_data['sub'])

if user is None:
user = await create_user(user_data['sub'], user_data.get('given_name', '') + user_data.get('family_name', ''), user_data.get('email', ''))
user = await create_user(
user_data['sub'],
user_data.get('given_name', '') + " " + user_data.get('family_name', ''),
user_data.get('email', '')
)

access_token = create_access_token(
data={
Expand Down

0 comments on commit a657f71

Please sign in to comment.