{% extends "misago/admin/conf/form.html" %} {% load i18n misago_admin_form %} {% block form-body %}
{% trans "Basic settings" context "admin oauth2 settings form" %} {% 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" context "admin oauth2 settings form" %} {% form_row form.oauth2_login_url %} {% form_row form.oauth2_scopes %}
{% trans "Retrieving access token" context "admin oauth2 settings form" %} {% form_row form.oauth2_token_url %} {% form_row form.oauth2_token_extra_headers %} {% form_row form.oauth2_json_token_path %}
{% trans "Retrieving user data" context "admin oauth2 settings form" %} {% 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" context "admin oauth2 settings form" %} {% form_row form.oauth2_send_welcome_email %}
{% trans "User JSON mappings" context "admin oauth2 settings form" %}

{% blocktrans trimmed context "admin oauth2 settings form" %} 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:" context "admin oauth2 settings form" %}

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

{% blocktrans trimmed context "admin oauth2 settings form" %} 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 %}