<%= form_tag rodauth.authorize_path, method: :post do %> <% if rodauth.oauth_application[rodauth.oauth_applications_logo_uri_column] %> <%= image_tag rodauth.oauth_application[rodauth.oauth_applications_logo_uri_column] %> <% end %>

The application <%= link_to rodauth.oauth_application[rodauth.oauth_applications_name_column], rodauth.oauth_application[rodauth.oauth_applications_homepage_url_column] %> would like to access your data.

<% if rodauth.oauth_application[rodauth.oauth_applications_tos_uri_column] %> <%= link_to rodauth.oauth_applications_tos_uri_label, rodauth.oauth_application[rodauth.oauth_applications_tos_uri_column], class: "list-group-item" %> <% end %> <% if rodauth.oauth_application[rodauth.oauth_applications_policy_uri_column] %> <%= link_to rodauth.oauth_applications_policy_uri_label, rodauth.oauth_application[rodauth.oauth_applications_policy_uri_column], class: "list-group-item" %> <% end %>
<% if rodauth.oauth_application[rodauth.oauth_applications_contacts_column] %>

<%= rodauth.oauth_applications_contacts_label %>

<% rodauth.oauth_application[rodauth.oauth_applications_contacts_column].split(/ +/).each do |contact| %>
<%= contact %>
<% end %>
<% end %>

<%= rodauth.oauth_tokens_scopes_label %>

<% rodauth.scopes.each do |scope| %> <% is_default = scope == rodauth.oauth_application_default_scope %>
<%= check_box_tag "scope[]", scope, is_default, disabled: is_default, id: scope, class: "form-check-input" %> <%= label_tag scope, scope, class: "form-check-label" %> <%= hidden_field_tag "scope[]", scope if is_default %>
<% end %> <%= hidden_field_tag :client_id, params[:client_id] %> <% %i[access_type response_type response_mode state redirect_uri].each do |oauth_param| %> <% if params[oauth_param] %> <%= hidden_field_tag oauth_param, params[oauth_param] %> <% end %> <% end %> <% if rodauth.features.include?(:oauth_resource_indicators) && rodauth.resource_indicators %> <% rodauth.resource_indicators.each do |resource| %> <%= hidden_field_tag "resource", resource %> <% end %> <% end %> <% if rodauth.features.include?(:oauth_pkce) %> <% if params[:code_challenge] %> <%= hidden_field_tag :code_challenge, params[:code_challenge] %> <% end %> <% if params[:code_challenge_method] %> <%= hidden_field_tag :code_challenge_method, params[:code_challenge_method] %> <% end %> <% end %> <% if rodauth.features.include?(:oidc) %> <% if params[:nonce] %> <%= hidden_field_tag :nonce, params[:nonce] %> <% end %> <% if params[:ui_locales] %> <%= hidden_field_tag :ui_locales, params[:ui_locales] %> <% end %> <% if params[:claims_locales] %> <%= hidden_field_tag :claims_locales, params[:claims_locales] %> <% end %> <% if params[:acr_values] %> <%= hidden_field_tag :acr, params[:acr_values] %> <% end %> <% end %>

<%= submit_tag rodauth.oauth_authorize_button, class: "btn btn-outline-primary" %> <%= link_to rodauth.oauth_cancel_button, "#{rodauth.redirect_uri}?error=access_denied&error_description=The+resource+owner+or+authorization+server+denied+the+request#{"&state=\#{rodauth.state}" if params[:state] }", class: "btn btn-outline-danger" %>

<% end %>