Skip to content

Commit

Permalink
Fix OAuth page styling (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbouder committed Jan 30, 2024
1 parent 08741a5 commit 119128f
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions jhub_apps/templates/oauth.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{% extends "page.html" %} {% block login_widget %} {% endblock %} {% block main
%}
<div class="container col-md-6">
<h1 class="text-center">Authorize access</h1>

<h2>
An application is requesting authorization to access data associated with
your JupyterHub account
</h2>

<p>
{{ oauth_client.description }} (oauth URL: {{ oauth_client.redirect_uri }})
would like permission to identify you. {% if scope_descriptions | length ==
1 and not scope_descriptions[0].scope %} It will not be able to take actions
on your behalf. {% endif %}
</p>

<h3>This will grant the application permission to:</h3>
<div>
<form method="POST" action="">
<input type="hidden" name="_xsrf" value="{{ xsrf }}" />
{# these are the 'real' inputs to the form -#} {% for scope in
allowed_scopes %}
<input type="hidden" name="scopes" value="{{ scope }}" />
{% endfor %} {% for scope_info in scope_descriptions %}
<div class="checkbox input-group">
<label>
<input type="checkbox" name="raw-scopes" checked="true" title="This
authorization is required" disabled="disabled" {# disabled because
it's required #} />
<span>
{{ scope_info['description'] }} {% if scope_info['filter'] %}
Applies to {{ scope_info['filter'] }}. {% endif %}
</span>
</label>
</div>
{% endfor %}
<input type="submit" value="Authorize" class="form-control btn-jupyter" />
</form>
</div>
</div>

{% endblock %}

0 comments on commit 119128f

Please sign in to comment.