mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
feat: rename Casdoor app URL to authenticator (#3553)
This commit is contained in:
parent
1600a6799a
commit
cfc6015aca
@ -118,6 +118,6 @@ func IsValidOrigin(origin string) (bool, error) {
|
|||||||
originHostOnly = fmt.Sprintf("%s://%s", urlObj.Scheme, urlObj.Hostname())
|
originHostOnly = fmt.Sprintf("%s://%s", urlObj.Scheme, urlObj.Hostname())
|
||||||
}
|
}
|
||||||
|
|
||||||
res := originHostOnly == "http://localhost" || originHostOnly == "https://localhost" || originHostOnly == "http://127.0.0.1" || originHostOnly == "http://casdoor-app" || strings.HasSuffix(originHostOnly, ".chromiumapp.org")
|
res := originHostOnly == "http://localhost" || originHostOnly == "https://localhost" || originHostOnly == "http://127.0.0.1" || originHostOnly == "http://casdoor-authenticator" || strings.HasSuffix(originHostOnly, ".chromiumapp.org")
|
||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ export const generateCasdoorAppUrl = (accessToken, forQrCode = true) => {
|
|||||||
return {qrUrl, error};
|
return {qrUrl, error};
|
||||||
}
|
}
|
||||||
|
|
||||||
qrUrl = `casdoor-app://login?serverUrl=${window.location.origin}&accessToken=${accessToken}`;
|
qrUrl = `casdoor-authenticator://login?serverUrl=${window.location.origin}&accessToken=${accessToken}`;
|
||||||
|
|
||||||
if (forQrCode && qrUrl.length >= 2000) {
|
if (forQrCode && qrUrl.length >= 2000) {
|
||||||
qrUrl = "";
|
qrUrl = "";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user