Skip to content

Commit 7d237db

Browse files
fix(auth): fix the login issue , upgrade underneath lib
1 parent 89e720f commit 7d237db

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

API/auth/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def get_user_from_db(osm_id: int):
3333

3434
def get_osm_auth_user(access_token):
3535
try:
36-
user = AuthUser(**osm_auth.deserialize_access_token(access_token))
36+
user = AuthUser(**osm_auth.deserialize_data(access_token))
3737
except Exception as ex:
3838
raise HTTPException(
3939
status_code=403, detail=[{"msg": "OSM Authentication failed"}]

API/auth/routers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ def callback(request: Request):
3737
Returns:
3838
- access_token (string)
3939
"""
40-
access_token = osm_auth.callback(str(request.url))
40+
callback_data = osm_auth.callback(str(request.url))
4141

42-
return access_token
42+
return {"access_token": callback_data["user_data"]}
4343

4444

4545
@router.get("/me/", response_model=AuthUser)

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ geojson==3.1.0
88

99
## Testing
1010
pytest==7.4.3
11-
httpx==0.26.0
11+
httpx==0.28.1
1212

1313
## Used for new relic monitoring
1414
newrelic==11.0.1
@@ -22,7 +22,7 @@ fastapi-versioning==0.10.0
2222
redis==5.0.3
2323
celery==5.3.6
2424
slowapi==0.1.8
25-
osm-login-python==1.0.2
25+
osm-login-python==2.1.4
2626
humanize==4.9.0
2727
python-slugify==8.0.1
2828
geomet==1.1.0

0 commit comments

Comments
 (0)