mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-25 19:10:53 +00:00
redirect to defaultredirect if authrequest is already handled
This commit is contained in:
@@ -183,6 +183,14 @@ export async function GET(request: NextRequest) {
|
|||||||
"code" in error &&
|
"code" in error &&
|
||||||
error?.code === 9
|
error?.code === 9
|
||||||
) {
|
) {
|
||||||
|
const loginSettings = await getLoginSettings(
|
||||||
|
selectedSession.factors?.user?.organizationId,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (loginSettings?.defaultRedirectUri) {
|
||||||
|
return NextResponse.redirect(loginSettings.defaultRedirectUri);
|
||||||
|
}
|
||||||
|
|
||||||
const signedinUrl = new URL("/signedin", request.url);
|
const signedinUrl = new URL("/signedin", request.url);
|
||||||
|
|
||||||
if (selectedSession.factors?.user?.loginName) {
|
if (selectedSession.factors?.user?.loginName) {
|
||||||
|
Reference in New Issue
Block a user