2018-05-28 07:15:02 -04:00
{% extends 'lemoncurry/layout.html' %}
{% block styles %}
< link rel = "stylesheet" type = "text/stylus" href = "{{ static('lemonauth/css/indie.styl') }}" >
{% endblock %}
{% block main %}
< div class = "container" >
< form class = "card" method = "post" action = "{{ url('lemonauth:indie_approve') }}" >
< h4 class = "card-header h-x-app" >
{% if app %}
2018-06-25 04:01:29 -04:00
{% if app.logo is defined %}
< img class = "u-logo" src = "{{ app.logo[0] }}" alt = "{{ app.name[0] }}" / >
{% endif %}
sign in to < span class = "p-name" > {{ app.name[0] }}< / span > (< a class = "u-url code" href = "{{ params.client_id }}" > {{ params.client_id }}< / a > )?
2018-05-28 07:15:02 -04:00
{% else %}
sign in to < a class = "u-url p-name code" href = "{{ params.client_id }}" > {{ params.client_id }}< / a > ?
{% endif %}
{% if verified %}
< span data-tooltip data-tippy-theme = "dark success" data-tippy-html = "#verified-success" >
< i class = "fas fa-check-circle verified-success" > < / i >
< / span >
{% else %}
< span data-tooltip data-tippy-theme = "dark warning" data-tippy-html = "#verified-warning" >
< i class = "fas fa-question-circle verified-warning" > < / i >
< / span >
{% endif %}
< / h4 >
< div class = "card-body" >
< p class = "card-text" > do you want to confirm your identity, < a class = "code" href = "{{ me }}" > {{ me }}< / a > , with this app?< / p >
{% if params.response_type == 'code' %}
< p class = "card-text" > additionally, this app is requesting the following < i > scopes< / i > - you can edit the scopes that will be granted to the app, if you wish< / p >
< div class = "card-text form-group" >
{% for scope in scopes %}
< div class = "form-check" >
< input class = "form-check-input" id = "scopes-{{ scope }}" name = "scope" type = "checkbox" checked value = "{{ scope }}" / >
< label class = "form-check-label" for = "scopes-{{ scope }}" > {{ scope }}< / label >
< / div >
{% endfor %}
< / div >
{% endif %}
< p class = "card-text" > < small > you will be redirected to < a class = "code" href = "{{ redirect_uri }}" > {{ redirect_uri }}< / a > after authorising this app< / small > < / p >
< / div >
< div class = "card-footer" >
< button class = "btn btn-success" type = "submit" >
< i class = "fas fa-check" > < / i >
approve
< / button >
< / div >
{{ csrf_input }}
< input type = "hidden" name = "me" value = "{{ me }}" >
< input type = "hidden" name = "client_id" value = "{{ params.client_id }}" >
< input type = "hidden" name = "redirect_uri" value = "{{ redirect_uri }}" >
{% if params.state %}
< input type = "hidden" name = "state" value = "{{ params.state }}" >
{% endif %}
< input type = "hidden" name = "response_type" value = "{{ params.response_type }}" >
< / form >
< / div >
< div id = "verified-success" hidden >
2024-03-13 04:12:36 -04:00
this client has been < strong > verified< / strong > using < code > {{ '< link rel = "redirect_uri" > ' | escape }}< / code > < br / > - they are who they claim to be!
2018-05-28 07:15:02 -04:00
< / div >
< div id = "verified-warning" hidden >
2024-03-13 04:12:36 -04:00
this client could < strong > not< / strong > be verified using < code > {{ '< link rel = "redirect_uri" > ' | escape }}< / code > < br / > - check the redirect uri carefully yourself!
2018-05-28 07:15:02 -04:00
< / div >
{% endblock %}
{% block foot %}
< script type = "text/javascript" >
2024-03-13 04:12:36 -04:00
tippy('[data-tippy-html]', {
2019-01-16 20:29:16 -05:00
arrow: true,
2024-03-13 04:12:36 -04:00
allowHTML: true,
maxWidth: 500,
2019-01-16 20:29:16 -05:00
content: function(element) {
return document.querySelector(element.getAttribute('data-tippy-html')).innerHTML;
}
});
2018-05-28 07:15:02 -04:00
< / script >
{% endblock %}