Skip to content

Commit

Permalink
fix: OIDC picture on user creation (#564)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomBursch authored Dec 2, 2024
1 parent c279486 commit 3c103d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/app/controller/auth/auth_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from app.models import User, Token, OIDCLink, OIDCRequest, ChallengeMailVerify
from app.errors import NotFoundRequest, UnauthorizedRequest
from app.service import mail
from app.service.file_has_access_or_download import file_has_access_or_download
from .schemas import Login, Signup, CreateLongLivedToken, GetOIDCLoginUrl, LoginOIDC
from app.config import (
EMAIL_MANDATORY,
Expand Down Expand Up @@ -382,7 +383,7 @@ def loginWithOIDC(args):
if "email_verified" in userinfo
else False
),
photo=userinfo["picture"] if "picture" in userinfo else None,
photo=file_has_access_or_download(userinfo["picture"]) if "picture" in userinfo else None,
).save()
oidcLink = OIDCLink(
sub=userinfo["sub"], provider=provider, user_id=newUser.id
Expand Down

0 comments on commit 3c103d3

Please sign in to comment.