mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 07:24:51 +00:00
session context
This commit is contained in:
@@ -27,9 +27,14 @@ export default async function Page(props: {
|
||||
organization,
|
||||
});
|
||||
|
||||
const branding = await getBrandingSettings(organization);
|
||||
// email links do not come with organization, thus we need to use the session's organization
|
||||
const branding = await getBrandingSettings(
|
||||
organization ?? session?.factors?.user?.organizationId,
|
||||
);
|
||||
|
||||
const loginSettings = await getLoginSettings(organization);
|
||||
const loginSettings = await getLoginSettings(
|
||||
organization ?? session?.factors?.user?.organizationId,
|
||||
);
|
||||
|
||||
const host = (await headers()).get("host");
|
||||
|
||||
|
||||
@@ -182,6 +182,7 @@ export function LoginOTP({
|
||||
|
||||
function setCodeAndContinue(values: Inputs, organization?: string) {
|
||||
return submitCode(values, organization).then(async (response) => {
|
||||
setLoading(true);
|
||||
// Wait for 2 seconds to avoid eventual consistency issues with an OTP code being verified in the /login endpoint
|
||||
await new Promise((resolve) => setTimeout(resolve, 4000));
|
||||
|
||||
@@ -206,6 +207,7 @@ export function LoginOTP({
|
||||
)
|
||||
: null;
|
||||
|
||||
setLoading(false);
|
||||
if (url) {
|
||||
router.push(url);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user