|
|
@@ -93,8 +93,13 @@ async def social_login(request: Request, data: schemas.SocialLogin):
|
|
|
|
|
|
# 1. Verify token if provider is Google
|
|
|
if data.provider == 'google':
|
|
|
+ print(f"DEBUG: Social Login attempt. id_token library available: {id_token is not None}")
|
|
|
+ print(f"DEBUG: config.GOOGLE_CLIENT_ID exists: {bool(config.GOOGLE_CLIENT_ID)}")
|
|
|
+ print(f"DEBUG: config.GOOGLE_CLIENT_ID value: {config.GOOGLE_CLIENT_ID}")
|
|
|
+
|
|
|
if not id_token or not config.GOOGLE_CLIENT_ID:
|
|
|
- raise HTTPException(status_code=500, detail="Google Auth not configured on server")
|
|
|
+ msg = f"Config error: id_token_lib={id_token is not None}, client_id_set={bool(config.GOOGLE_CLIENT_ID)}"
|
|
|
+ raise HTTPException(status_code=500, detail=f"Google Auth not configured on server ({msg})")
|
|
|
|
|
|
try:
|
|
|
# Verify the ID token
|