Skip to content

Commit cfc6015

Browse files
authored
feat: rename Casdoor app URL to authenticator (casdoor#3553)
1 parent 1600a67 commit cfc6015

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

util/validation.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,6 @@ func IsValidOrigin(origin string) (bool, error) {
118118
originHostOnly = fmt.Sprintf("%s://%s", urlObj.Scheme, urlObj.Hostname())
119119
}
120120

121-
res := originHostOnly == "http://localhost" || originHostOnly == "https://localhost" || originHostOnly == "http://127.0.0.1" || originHostOnly == "http://casdoor-app" || strings.HasSuffix(originHostOnly, ".chromiumapp.org")
121+
res := originHostOnly == "http://localhost" || originHostOnly == "https://localhost" || originHostOnly == "http://127.0.0.1" || originHostOnly == "http://casdoor-authenticator" || strings.HasSuffix(originHostOnly, ".chromiumapp.org")
122122
return res, nil
123123
}

web/src/common/CasdoorAppConnector.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const generateCasdoorAppUrl = (accessToken, forQrCode = true) => {
2727
return {qrUrl, error};
2828
}
2929

30-
qrUrl = `casdoor-app://login?serverUrl=${window.location.origin}&accessToken=${accessToken}`;
30+
qrUrl = `casdoor-authenticator://login?serverUrl=${window.location.origin}&accessToken=${accessToken}`;
3131

3232
if (forQrCode && qrUrl.length >= 2000) {
3333
qrUrl = "";

0 commit comments

Comments
 (0)