Quellcode durchsuchen

show oauth error callback message when auth fails (#4058)

This change aims to display the oauth error to the user when the autnetication process fails.

Close #4048
bubble
wayglem vor 6 Jahren
committed by kyle
Ursprung
Commit
1f565b4847
2 geänderte Dateien mit 16 neuen und 2 gelöschten Zeilen
  1. +8
    -1
      dev-helpers/oauth2-redirect.html
  2. +8
    -1
      dist/oauth2-redirect.html

+ 8
- 1
dev-helpers/oauth2-redirect.html Datei anzeigen

@@ -45,11 +45,18 @@
oauth2.auth.code = qp.code;
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
} else {
let oauthErrorMsg
if (qp.error) {
oauthErrorMsg = "["+qp.error+"]: " +
(qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
(qp.error_uri ? "More info: "+qp.error_uri : "");
}

oauth2.errCb({
authId: oauth2.auth.name,
source: "auth",
level: "error",
message: "Authorization failed: no accessCode received from the server"
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server"
});
}
} else {


+ 8
- 1
dist/oauth2-redirect.html Datei anzeigen

@@ -45,11 +45,18 @@
oauth2.auth.code = qp.code;
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
} else {
let oauthErrorMsg
if (qp.error) {
oauthErrorMsg = "["+qp.error+"]: " +
(qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
(qp.error_uri ? "More info: "+qp.error_uri : "");
}

oauth2.errCb({
authId: oauth2.auth.name,
source: "auth",
level: "error",
message: "Authorization failed: no accessCode received from the server"
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server"
});
}
} else {


Laden…
Abbrechen
Speichern