redirect differently for org auth domain

This commit is contained in:
miloschwartz
2026-08-19 16:26:44 -04:00
parent 114592add8
commit 887e13888d
@@ -201,8 +201,12 @@ export default async function ResourceAuthPage(props: {
// Inference resources never establish a resource session on the inference // Inference resources never establish a resource session on the inference
// host. Authenticated users retrieve their virtual API key on the dashboard. // host. Authenticated users retrieve their virtual API key on the dashboard.
if (isInference && user) { if (isInference && user) {
if (host !== expectedHost) {
redirect(`/auth/org?redirect=${encodeURIComponent(keysPath)}`);
} else {
redirect(keysPath); redirect(keysPath);
} }
}
// After password/pincode/SSO, do not send the browser back to the // After password/pincode/SSO, do not send the browser back to the
// inference host (session alone cannot pass Badger). Land on keys instead. // inference host (session alone cannot pass Badger). Land on keys instead.