feat: oauth

This commit is contained in:
nullishamy 2025-05-01 23:23:29 +01:00
parent 4167a2f8bb
commit f7f57e92e3
Signed by: amy
SSH key fingerprint: SHA256:WmV0uk6WgAQvDJlM8Ld4mFPHZo02CLXXP5VkwQ5xtyk
4 changed files with 108 additions and 12 deletions

View file

@ -0,0 +1,46 @@
<!DOCTYPE html>
<html lang="en">
<head>
<base href="https://ferri.amy.mov/admin/">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Ferri Test</title>
<link rel="stylesheet" href="https://raw.githubusercontent.com/tailwindlabs/tailwindcss/dbc8023a08964f513c20796e170cb91ce891df3f/packages/tailwindcss/preflight.css">
<script src="https://unpkg.com/htmx.org@2.0.4"></script>
<style>
main {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
max-width: 80%;
margin: auto;
}
</style>
</head>
<body>
<main>
<h1>Authorization request</h1>
<span>
App '{{ client.id }}' would like to access the following scopes in your account
</span>
<ul>
{% for scope in scopes %}
<li>{{ scope }}</li>
{% endfor %}
</ul>
<button
hx-post="/oauth/accept?id={{ user_id }}&client_id={{ client.id }}&scope={{ scope_raw }}"
>
Accept and return to {{ redirect_uri }}?
</button>
</main>
</body>
</html>