<%= rodauth.new_oauth_application_page_title %>

<%= form_tag rodauth.oauth_applications_path, method: :post, class: "form-horizontal" do %> <%= rodauth.field_error('scope') %>
<%= label_tag "name", rodauth.oauth_applications_name_label %> <%= text_field_tag "name", rodauth.param('name'), class: "form-control#{' is-invalid' if rodauth.field_error('name')}" %> <%= rodauth.field_error('name') %>
<%= label_tag "description", rodauth.oauth_applications_description_label %> <%= text_field_tag "description", rodauth.param('description'), class: "form-control#{' is-invalid' if rodauth.field_error('description')}" %> <%= rodauth.field_error('description') %>
<%= label_tag "homepage_url", rodauth.oauth_applications_homepage_url_label %> <%= text_field_tag "homepage_url", rodauth.param('homepage_url'), id: "homepage-url", class: "form-control#{' is-invalid' if rodauth.field_error('homepage_url')}" %> <%= rodauth.field_error('homepage_url') %>
<%= label_tag "redirect_uri", rodauth.oauth_applications_redirect_uri_label %> <%= text_field_tag "redirect_uri", rodauth.param('redirect_uri'), id: "redirect-uri", class: "form-control#{' is-invalid' if rodauth.field_error('redirect_uri')}" %> <%= rodauth.field_error('redirect_uri') %>
<%= label_tag "client_secret", rodauth.oauth_applications_client_secret_label %> <%= text_field_tag "client_secret", rodauth.param('client_secret'), id: "client-secret", class: "form-control#{' is-invalid' if rodauth.field_error('client_secret')}" %> <%= rodauth.field_error('client_secret') %>
<% if rodauth.features.include?(:oauth_jwt) %>
<%= label_tag "jwks", rodauth.oauth_applications_jwks_label %> <%= text_field_tag "jwks", rodauth.param('jwks'), id: "jwks", class: "form-control#{' is-invalid' if rodauth.field_error('jwks')}" %> <%= rodauth.field_error('jwks') %>
<%= label_tag "jwks_uri", rodauth.oauth_applications_jwks_uri_label %> <%= text_field_tag "jwks_uri", rodauth.param('jwks_uri'), id: "jwks-uri", class: "form-control#{' is-invalid' if rodauth.field_error('jwks_uri')}" %> <%= rodauth.field_error('jwks_uri') %>
<% end %> <% rodauth.oauth_application_scopes.each do |scope| %>
<%= check_box_tag "scopes[]", scope, false, id: scope, class: "form-check-input" %> <%= scope %>
<% end %>
<%= submit_tag rodauth.oauth_application_button, class: "btn btn-primary" %>
<% end %>