mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 02:02:23 +00:00
authurl from idp as nextstep
This commit is contained in:
@@ -99,6 +99,10 @@ export async function POST(request: NextRequest) {
|
||||
`${host}/idp/${provider}/failure?` +
|
||||
new URLSearchParams(params),
|
||||
},
|
||||
}).then((resp: any) => {
|
||||
if (resp.authUrl) {
|
||||
return NextResponse.json({ nextStep: resp.authUrl });
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (
|
||||
@@ -119,7 +123,7 @@ export async function POST(request: NextRequest) {
|
||||
);
|
||||
|
||||
return NextResponse.json({
|
||||
nextUrl: registerUrl,
|
||||
nextStep: registerUrl,
|
||||
status: 200,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -181,6 +181,10 @@ export async function GET(request: NextRequest) {
|
||||
`${host}/idp/${provider}/failure?` +
|
||||
new URLSearchParams(params),
|
||||
},
|
||||
}).then((resp: any) => {
|
||||
if (resp.authUrl) {
|
||||
return NextResponse.redirect(resp.authUrl);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,8 +83,8 @@ export default function UsernameForm({
|
||||
organization?: string,
|
||||
) {
|
||||
return submitLoginName(values, organization).then((response) => {
|
||||
if (response.nextUrl) {
|
||||
return router.push(response.nextUrl);
|
||||
if (response.nextStep) {
|
||||
return router.push(response.nextStep);
|
||||
} else if (response.authMethodTypes.length == 1) {
|
||||
const method = response.authMethodTypes[0];
|
||||
switch (method) {
|
||||
|
||||
Reference in New Issue
Block a user