File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,7 +131,8 @@ async def device_login(
131131 if redirect_uri :
132132 params ["redirect_uri" ] = redirect_uri
133133 next_url = f"/auth/device/login?{ urlencode (params )} "
134- return RedirectResponse (f"/?next={ quote (next_url )} " , status_code = 302 )
134+ # /login is the only frontend surface that resumes ?next= after auth.
135+ return RedirectResponse (f"/login?next={ quote (next_url )} " , status_code = 302 )
135136
136137 # Check for existing active grant (auto-approve)
137138 grant = await grant_repo .find_active_grant (user .user_id , app_id )
Original file line number Diff line number Diff line change @@ -290,7 +290,7 @@ def test_device_login_unauthenticated_redirects(
290290 )
291291 assert resp .status_code == 302
292292 loc = resp .headers ["location" ]
293- assert "/ ?next=" in loc
293+ assert loc . startswith ( "/login ?next=")
294294 assert "spoo-snap" in loc
295295 assert "abc" in loc
296296 # The PKCE challenge must survive the login round-trip
You can’t perform that action at this time.
0 commit comments