Fixed names
This commit is contained in:
parent
66cd1defd8
commit
a904885023
2
main.go
2
main.go
|
@ -772,6 +772,7 @@ func main() {
|
|||
err := conn.QueryRow("SELECT appId, rdiruri FROM oauth WHERE appId = ? LIMIT 1", appId).Scan(&appidcheck, &rdiruricheck)
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
fmt.Println(appId)
|
||||
c.String(401, "OAuth screening failed")
|
||||
} else {
|
||||
log.Println("[ERROR] Unknown in /api/auth at", strconv.FormatInt(time.Now().Unix(), 10)+":", err)
|
||||
|
@ -785,6 +786,7 @@ func main() {
|
|||
}
|
||||
|
||||
if !(appidcheck == appId) {
|
||||
fmt.Println(appidcheck, appId)
|
||||
c.String(401, "OAuth screening failed")
|
||||
return
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ if (remote == null) {
|
|||
|
||||
|
||||
function attempt() {
|
||||
if (document.getElementById("appidbox").value.match(/^[A-Za-z]+$/)) {
|
||||
if (document.getElementById("appidbox").value != "") {
|
||||
fetch(origin + "/api/newauth", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
|
@ -83,6 +83,8 @@ function getauths() {
|
|||
});
|
||||
|
||||
oauthElement.append(oauthText)
|
||||
oauthElement.append(oauthName)
|
||||
oauthElement.append(oauthUrl)
|
||||
oauthElement.append(oauthRemoveButton)
|
||||
oauthElement.classList.add("oauthentry")
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<div class="newoauth">
|
||||
<h2>Submit a new OAuth2 App</h2>
|
||||
<p id="status"></p>
|
||||
<p>AppID:</p>
|
||||
<p>App Name:</p>
|
||||
<input id="appidbox">
|
||||
<p>Redirect URI:</p>
|
||||
<input id="rdiruribox">
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
// Get URL parameters
|
||||
if (urlParams.has('client_id')) {
|
||||
client_id = urlParams.get('client_id')
|
||||
let name = document.getElementById("passthrough").innerText;
|
||||
statusBox.textContent = "Would you like to allow " + name + " to access your user information?";
|
||||
redirect_uri = urlParams.get('redirect_uri');
|
||||
|
|
Reference in New Issue