mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-07 15:36:20 +00:00
add org auth slug with device auth support
This commit is contained in:
@@ -57,9 +57,15 @@ export default function IdpLoginButtons({
|
||||
|
||||
let redirectToUrl: string | undefined;
|
||||
try {
|
||||
console.log(
|
||||
"generating",
|
||||
idpId,
|
||||
redirect || "/",
|
||||
orgId
|
||||
);
|
||||
const response = await generateOidcUrlProxy(
|
||||
idpId,
|
||||
redirect || "/auth/org?gotoapp=app",
|
||||
redirect || "/",
|
||||
orgId
|
||||
);
|
||||
|
||||
@@ -70,7 +76,6 @@ export default function IdpLoginButtons({
|
||||
}
|
||||
|
||||
const data = response.data;
|
||||
console.log("Redirecting to:", data?.redirectUrl);
|
||||
if (data?.redirectUrl) {
|
||||
redirectToUrl = data.redirectUrl;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import { TransferSessionResponse } from "@server/routers/auth/types";
|
||||
|
||||
type ValidateSessionTransferTokenParams = {
|
||||
token: string;
|
||||
redirect?: string;
|
||||
};
|
||||
|
||||
export default function ValidateSessionTransferToken(
|
||||
@@ -49,7 +50,9 @@ export default function ValidateSessionTransferToken(
|
||||
}
|
||||
|
||||
if (doRedirect) {
|
||||
redirect(env.app.dashboardUrl);
|
||||
// add redirect param to dashboardUrl if provided
|
||||
const fullUrl = `${env.app.dashboardUrl}${props.redirect || ""}`;
|
||||
router.push(fullUrl);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user