{% extends "/layouts/minimal.twig" %}

{% block title p__('title', 'Authentication')|title %}

{% block template %}
<div class="box" data-density="comfortable">
  {% include "snippets/initializing.twig" with {text: __('Authenticating...')} only %}
</div>
{% endblock %}

{% block scripts %}
<script>
  // Save the JWT to local storage to be used for future api requests
  localStorage.setItem('jwt', '{{ jwt }}');
  localStorage.setItem('last_auth_method', '{{ provider }}');
  window.location.href = `{{ option.site.default_app_page ?? '/app' }}`;
</script>
{% endblock %}