Fix PocketID callback URL to use full base URL
This commit is contained in:
@@ -77,7 +77,7 @@ async def pocketid_login_url(db: AsyncSession = Depends(get_db)):
|
||||
from urllib.parse import urlencode
|
||||
params = {
|
||||
"client_id": client_id,
|
||||
"redirect_uri": "/api/auth/pocketid/callback",
|
||||
"redirect_uri": f"{settings.base_url}/api/auth/pocketid/callback",
|
||||
"response_type": "code",
|
||||
"scope": "openid profile email",
|
||||
}
|
||||
@@ -94,7 +94,7 @@ async def pocketid_callback(code: str, db: AsyncSession = Depends(get_db)):
|
||||
resp = await client.post(
|
||||
f"{issuer}/token",
|
||||
data={"grant_type": "authorization_code", "code": code,
|
||||
"redirect_uri": "/api/auth/pocketid/callback",
|
||||
"redirect_uri": f"{settings.base_url}/api/auth/pocketid/callback",
|
||||
"client_id": client_id, "client_secret": client_secret},
|
||||
)
|
||||
if resp.status_code != 200:
|
||||
|
||||
Reference in New Issue
Block a user