mirror of
https://github.com/nullishamy/ferri.git
synced 2025-06-28 00:54:17 +00:00
feat: oauth
This commit is contained in:
parent
4167a2f8bb
commit
f7f57e92e3
4 changed files with 108 additions and 12 deletions
46
ferri-server/templates/authorize.html
Normal file
46
ferri-server/templates/authorize.html
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue