<%= 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 "jws_jwk", rodauth.oauth_applications_jws_jwk_label %> <%= text_field_tag "jws_jwk", rodauth.param('jws_jwk'), id: "jws-jwk", class: "form-control#{' is-invalid' if rodauth.field_error('jws_jwk')}" %> <%= rodauth.field_error('jws_jwk') %>
<%= label_tag "jwt_public_key", rodauth.oauth_applications_jwt_public_key_label %> <%= text_field_tag "jwt_public_key", rodauth.param('jwt_public_key'), id: "jwt-public-key", class: "form-control#{' is-invalid' if rodauth.field_error('jwt_public_key')}" %> <%= rodauth.field_error('jwt_public_key') %>
<% end %> <% rodauth.oauth_application_scopes.each do |scope| %>
<%= check_box_tag "scopes[]", scope, scope == rodauth.oauth_application_default_scope, id: scope, class: "form-check-input" %> <%= scope %>
<% end %>
<%= submit_tag rodauth.oauth_application_button, class: "btn btn-primary" %>
<% end %>