{% extends "misago/admin/conf/form.html" %} {% load i18n misago_admin_form %} {% block form-body %}
{% trans "Basic settings" %} {% form_row form.enable_oauth2_client %} {% form_row form.oauth2_provider %} {% form_row form.oauth2_client_id %} {% form_row form.oauth2_client_secret %}
{% trans "Initializing login" %} {% form_row form.oauth2_login_url %} {% form_row form.oauth2_scopes %}
{% trans "Retrieving access token" %} {% form_row form.oauth2_token_url %} {% form_row form.oauth2_token_method %} {% form_row form.oauth2_token_extra_headers %} {% form_row form.oauth2_json_token_path %}
{% trans "Retrieving user data" %} {% form_row form.oauth2_user_url %} {% form_row form.oauth2_user_method %} {% form_row form.oauth2_user_token_location %} {% form_row form.oauth2_user_token_name %} {% form_row form.oauth2_user_extra_headers %}
{% trans "New user sign-ons" %} {% form_row form.oauth2_send_welcome_email %}
{% trans "User JSON mappings" %}

{% blocktrans trimmed %} Path to value is a key under which it can be found in the JSON with user data returned by the provider. If this key is nested under other key, use full path and separate keys with periods ("."). {% endblocktrans %}

{% trans "For example, for given JSON with user data:" %}

{
  "id": "380422",
  "name": "Bob",
  "email": "bob@example.com",
  "picture": {
    "url": "http://exmaple.com/users/avatars/f7s6a8d68sa68sa.jpg"
  }
}

{% blocktrans trimmed %} Those paths should be used: {% endblocktrans %}

{% form_row form.oauth2_json_id_path %} {% form_row form.oauth2_json_name_path %} {% form_row form.oauth2_json_email_path %} {% form_row form.oauth2_json_avatar_path %}
{% endblock form-body %}