fix: OAuth callback redirect was broken — rsplit('/api/', 1) instead of rsplit('/', 2)
The callback was redirecting to http://ip:port/api/#/callback?token=... instead of http://ip:port/#/callback?token=... — the SPA lives at root, not /api/.
This commit is contained in:
parent
f8fcb1670b
commit
9c7ccdead7
1 changed files with 1 additions and 1 deletions
|
|
@ -314,7 +314,7 @@ class DashboardServer:
|
|||
token = _make_token(user_id, secret)
|
||||
|
||||
# Redirect to frontend with token
|
||||
base_url = redirect_uri.rsplit("/", 2)[0] # Remove /api/auth/callback
|
||||
base_url = redirect_uri.rsplit("/api/", 1)[0] # Remove /api/auth/callback
|
||||
resp = web.HTTPFound(f"{base_url}/#/callback?token={token}")
|
||||
resp.set_cookie(
|
||||
"eve_token", token,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue