add simple app authorization page

This commit is contained in:
Mystikfluu
2023-02-10 16:05:58 +01:00
parent abc03b4cde
commit 83941add4d
10 changed files with 233 additions and 8 deletions
+31
View File
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<% if(user.username === undefined) { %>
<meta name="description" content="<%-unauthorized_description%>">
<% } else { %>
<meta name="description" content="IPost Extension Authorization Page">
<% } %>
<title>Authorize App</title>
<style>
<%- globalcss %>
<%- loadfile("./css/authorize.css") %>
</style>
<% if(user.username === undefined) { %>
<script> document.location.href = '/no_login?r='+encodeURIComponent(document.location.pathname) </script>
<% } else { %>
<script src="https://js.hcaptcha.com/1/api.js" async defer></script>
<% } %>
</head>
<body>
<div class="center">
<h1>Authorize App</h1>
<p>Please authorize the app to access your information:</p>
<form action="/authorize" method="post">
<input type="number" value=<%- query.id %> class="hidden" name="application_id" id="application_id">
<div class="h-captcha" data-sitekey="<%- hcaptcha_sitekey %>"></div>
<input type="submit" value="Authorize">
</form>
</div>
</body>
</html>