fix: invalid redirect url after sign up (#896)

* fix: invalid redirect url after sign up

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>

* Update App.js

* Update Setting.js

Co-authored-by: Yang Luo <hsluoyz@qq.com>
This commit is contained in:
Yixiang Zhao
2022-07-19 23:31:17 +08:00
committed by GitHub
parent 1839252c30
commit 48b5b27982
3 changed files with 20 additions and 10 deletions

View File

@ -662,8 +662,8 @@ 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");
if (!application.enablePassword && window.location.pathname.includes("/auto-signup/oauth/authorize")) {
const link = window.location.href.replace("/auto-signup/oauth/authorize", "/login/oauth/authorize");
goToLink(link);
return;
}
@ -685,7 +685,7 @@ export function goToSignup(ths, application) {
}
if (!application.enablePassword && window.location.pathname.includes("/login/oauth/authorize")) {
const link = window.location.href.replace("/login/oauth/authorize", "/signup/oauth/authorize");
const link = window.location.href.replace("/login/oauth/authorize", "/auto-signup/oauth/authorize");
goToLink(link);
return;
}