diff --git a/main.go b/main.go index 3d603cc..98121a6 100644 --- a/main.go +++ b/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 } diff --git a/static/js/dashboard.js b/static/js/dashboard.js index 8e82609..927e838 100644 --- a/static/js/dashboard.js +++ b/static/js/dashboard.js @@ -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") diff --git a/templates/dashboard.html b/templates/dashboard.html index ab32fc0..1795279 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -11,7 +11,7 @@

Submit a new OAuth2 App

-

AppID:

+

App Name:

Redirect URI:

diff --git a/templates/main.html b/templates/main.html index a753a23..a7ee869 100644 --- a/templates/main.html +++ b/templates/main.html @@ -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');