File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -493,11 +493,13 @@ async def oauth_callback(
493
493
# Handle case where user has used product outside of web and is now creating an account through web
494
494
if not user .role .is_web_login ():
495
495
# We must use the existing user in the session if it matches
496
- # the user we just got by email/oauth
497
- if user .id :
498
- user_by_session = await db_session .get (User , user .id )
499
- if user_by_session :
500
- user = user_by_session
496
+ # the user we just got by email/oauth. Note that this only applies
497
+ # to multi-tenant, due to the overwriting of the user_db
498
+ if MULTI_TENANT :
499
+ if user .id :
500
+ user_by_session = await db_session .get (User , user .id )
501
+ if user_by_session :
502
+ user = user_by_session
501
503
502
504
await self .user_db .update (
503
505
user ,
You can’t perform that action at this time.
0 commit comments