diff --git a/web/src/Setting.js b/web/src/Setting.js index 9c2b7d32..f19066c4 100644 --- a/web/src/Setting.js +++ b/web/src/Setting.js @@ -262,6 +262,12 @@ export function goToLogin(ths, application) { return; } + if (!application.enablePassword && window.location.pathname.includes("/signup/oauth/authorize")) { + const link = window.location.href.replace("/signup/oauth/authorize", "/login/oauth/authorize"); + goToLink(link); + return; + } + if (authConfig.appName === application.name) { goToLinkSoft(ths, "/login"); } else { @@ -278,6 +284,12 @@ export function goToSignup(ths, application) { return; } + if (!application.enablePassword && window.location.pathname.includes("/login/oauth/authorize")) { + const link = window.location.href.replace("/login/oauth/authorize", "/signup/oauth/authorize"); + goToLink(link); + return; + } + if (authConfig.appName === application.name) { goToLinkSoft(ths, "/signup"); } else { diff --git a/web/src/auth/Util.js b/web/src/auth/Util.js index 00dce63d..204af1a6 100644 --- a/web/src/auth/Util.js +++ b/web/src/auth/Util.js @@ -14,7 +14,6 @@ import React from "react"; import {Alert, Button, message, Result} from "antd"; -import * as Setting from "../Setting"; export function showMessage(type, text) { if (type === "success") { @@ -55,12 +54,17 @@ export function renderMessageLarge(ths, msg) { title="There was a problem signing you in.." subTitle={msg} extra={[ - , - , + // , + // , ]} >