-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
130 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"overrides": [ | ||
{ | ||
"files": ["*.html"], | ||
"options": { | ||
"parser": "jinja-template" | ||
} | ||
} | ||
], | ||
"plugins": ["prettier-plugin-jinja-template"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,65 @@ | ||
{% extends "base.html" %} | ||
|
||
<br /> | ||
{% block title %} OAuth Login {% endblock %} | ||
{% block title %} | ||
OAuth Login | ||
{% endblock %} | ||
|
||
<br /> | ||
{% block body %} {% macro add_query_params() %} | ||
<input type="hidden" name="client_id" value="{{ query.client_id }}" /> | ||
<input type="hidden" name="redirect_uri" value="{{ query.redirect_uri }}" /> | ||
<input type="hidden" name="response_type" value="{{ query.response_type }}" /> | ||
<input type="hidden" name="scope" value="{{ query.scope }}" /> | ||
<input type="hidden" name="state" value="{{ query.state }}" /> | ||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}" /> | ||
{% macro add_query_params() %} | ||
<input type="hidden" name="client_id" value="{{ query.client_id }}" /> | ||
<input type="hidden" name="redirect_uri" value="{{ query.redirect_uri }}" /> | ||
<input type="hidden" name="response_type" value="{{ query.response_type }}" /> | ||
<input type="hidden" name="scope" value="{{ query.scope }}" /> | ||
<input type="hidden" name="state" value="{{ query.state }}" /> | ||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}" /> | ||
{% endmacro %} | ||
|
||
<main | ||
class="flex flex-col place-content-center items-center w-screen min-h-screen" | ||
> | ||
<h1 class="italic text-shade1-dark">Kitsune</h1> | ||
{% block body %} | ||
<main | ||
class="flex flex-col place-content-center items-center w-screen min-h-screen" | ||
> | ||
<h1 class="italic text-shade1-dark">Kitsune</h1> | ||
|
||
<div class="flex flex-col items-center"> | ||
<div> | ||
<span class="font-bold text-shade1-dark">{{app_name}}</span> wants the | ||
following access to your Kitsune account: | ||
<p></p> | ||
<ul class="list-['>']"> | ||
{% for scope in scopes %} | ||
<li>{{ scope }}</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
<div class="flex flex-col items-center"> | ||
<div> | ||
<span class="font-bold text-shade1-dark">{{ app_name }}</span> wants the | ||
following access to your Kitsune account: | ||
<p></p> | ||
<ul class="list-['>']"> | ||
{% for scope in scopes %} | ||
<li>{{ scope }}</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
|
||
<form class="w-full" method="get"> | ||
{{ add_query_params() }} | ||
<input type="hidden" name="login_consent" value="accept" /> | ||
<input | ||
class="w-full [&:not(:hover)]:text-dark-1 bg-shade1-dark hover:enabled:bg-shade2-dark min-h-1 cursor-pointer rounded p-2 transition duration-500" | ||
type="submit" | ||
value="Accept" | ||
/> | ||
</form> | ||
<form class="w-full" method="get"> | ||
{{ add_query_params() }} | ||
<input type="hidden" name="login_consent" value="accept" /> | ||
<input | ||
class="w-full [&:not(:hover)]:text-dark-1 bg-shade1-dark hover:enabled:bg-shade2-dark min-h-1 cursor-pointer rounded p-2 transition duration-500" | ||
type="submit" | ||
value="Accept" | ||
/> | ||
</form> | ||
|
||
<form class="w-full" method="get"> | ||
{{ add_query_params() }} | ||
<input type="hidden" name="login_consent" value="deny" /> | ||
<input | ||
class="w-full my-3 [&:not(:hover)]:text-dark-1 bg-shade1-dark hover:enabled:bg-shade2-dark min-h-1 cursor-pointer rounded p-2 transition duration-500" | ||
type="submit" | ||
value="Deny" | ||
/> | ||
</form> | ||
<form class="w-full" method="get"> | ||
{{ add_query_params() }} | ||
<input type="hidden" name="login_consent" value="deny" /> | ||
<input | ||
class="w-full my-3 [&:not(:hover)]:text-dark-1 bg-shade1-dark hover:enabled:bg-shade2-dark min-h-1 cursor-pointer rounded p-2 transition duration-500" | ||
type="submit" | ||
value="Deny" | ||
/> | ||
</form> | ||
|
||
<div> | ||
Authenticated as | ||
<span class="font-bold">{{ authenticated_username }}</span> ~ | ||
<a | ||
href="#" | ||
onclick="document.cookie='user_id=; expires=Thu, 01 Jan 1970 00:00:00 UTC;';window.location.reload();" | ||
>Logout</a | ||
> | ||
<div> | ||
Authenticated as | ||
<span class="font-bold">{{ authenticated_username }}</span> ~ | ||
<a | ||
href="#" | ||
onclick="document.cookie='user_id=; expires=Thu, 01 Jan 1970 00:00:00 UTC;';window.location.reload();" | ||
>Logout</a | ||
> | ||
</div> | ||
</div> | ||
</div> | ||
</main> | ||
</main> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
{% extends "base.html" %} | ||
|
||
<div></div> | ||
{% block title %}OAuth Login{% endblock %} | ||
{% block title %} | ||
OAuth Login | ||
{% endblock %} | ||
|
||
<div></div> | ||
{% block body %} | ||
<main | ||
class="flex flex-col place-content-center items-center w-screen min-h-screen" | ||
> | ||
<h1 class="italic text-shade1-dark">Kitsune</h1> | ||
<main | ||
class="flex flex-col place-content-center items-center w-screen min-h-screen" | ||
> | ||
<h1 class="italic text-shade1-dark">Kitsune</h1> | ||
|
||
{% if flash_messages|length != 0 %} | ||
<ul class="list-none border-4 border-solid border-red-500 px-4 py-2"> | ||
{% for (_level, msg) in flash_messages %} | ||
<li>{{msg}}</li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
{% if flash_messages|length != 0 %} | ||
<ul class="list-none border-4 border-solid border-red-500 px-4 py-2"> | ||
{% for (_level, msg) in flash_messages %} | ||
<li>{{ msg }}</li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
|
||
<form class="flex flex-col gap-6" method="post"> | ||
<label for="username" | ||
>Username | ||
<input | ||
class="w-full border-0 border-b-2 border-gray-200 bg-transparent" | ||
type="text" | ||
id="username" | ||
name="username" | ||
value="" | ||
/> | ||
</label> | ||
<label for="password" | ||
>Password | ||
<form class="flex flex-col gap-6" method="post"> | ||
<label for="username" | ||
>Username | ||
<input | ||
class="w-full border-0 border-b-2 border-gray-200 bg-transparent" | ||
type="text" | ||
id="username" | ||
name="username" | ||
value="" | ||
/> | ||
</label> | ||
<label for="password" | ||
>Password | ||
<input | ||
class="w-full border-0 border-b-2 border-gray-200 bg-transparent" | ||
type="password" | ||
id="password" | ||
name="password" | ||
value="" | ||
/> | ||
</label> | ||
<input | ||
class="w-full border-0 border-b-2 border-gray-200 bg-transparent" | ||
type="password" | ||
id="password" | ||
name="password" | ||
value="" | ||
class="[&:not(:hover)]:text-dark-1 bg-shade1-dark hover:enabled:bg-shade2-dark min-h-1 cursor-pointer rounded p-2 transition duration-500" | ||
type="submit" | ||
value="Submit" | ||
/> | ||
</label> | ||
<input | ||
class="[&:not(:hover)]:text-dark-1 bg-shade1-dark hover:enabled:bg-shade2-dark min-h-1 cursor-pointer rounded p-2 transition duration-500" | ||
type="submit" | ||
value="Submit" | ||
/> | ||
</form> | ||
</main> | ||
</form> | ||
</main> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
{% extends "base.html" %} | ||
|
||
<br /> | ||
{% block title %} OAuth Token {% endblock %} | ||
{% block title %} | ||
OAuth Token | ||
{% endblock %} | ||
|
||
<br /> | ||
{% block body %} | ||
<p class="header">{{domain}}</p> | ||
<p class="header">{{ domain }}</p> | ||
|
||
<div class="tokenContainer"> | ||
<p>Copy & Paste this token into <span class="appName">{{app_name}}</span></p> | ||
<code class="token">{{token}}</code> | ||
</div> | ||
<div class="tokenContainer"> | ||
<p> | ||
Copy & Paste this token into <span class="appName">{{ app_name }}</span> | ||
</p> | ||
<code class="token">{{ token }}</code> | ||
</div> | ||
{% endblock %} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.