<% if params[:redirect_uri]&.start_with?('sureapp://') || params[:display] == 'mobile' %> <% end %>

<%= raw t(".prompt", client_name: content_tag(:span, @pre_auth.client.name, class: "font-medium text-primary")) %>

<% if @pre_auth.scopes.count > 0 %>

<%= t(".able_to") %>:

<% end %>
<% turbo_disabled = params[:redirect_uri]&.start_with?("sureapp://") || params[:display] == "mobile" %> <%= form_tag oauth_authorization_path, method: :post, class: "w-full", data: { turbo: !turbo_disabled } do %> <%= hidden_field_tag :client_id, @pre_auth.client.uid, id: nil %> <%= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri, id: nil %> <%= hidden_field_tag :state, @pre_auth.state, id: nil %> <%= hidden_field_tag :response_type, @pre_auth.response_type, id: nil %> <%= hidden_field_tag :response_mode, @pre_auth.response_mode, id: nil %> <%= hidden_field_tag :scope, @pre_auth.scope, id: nil %> <%= hidden_field_tag :code_challenge, @pre_auth.code_challenge, id: nil %> <%= hidden_field_tag :code_challenge_method, @pre_auth.code_challenge_method, id: nil %> <% if params[:display].present? %> <%= hidden_field_tag :display, params[:display], id: nil %> <% end %> <%= render DS::Button.new( text: t("doorkeeper.authorizations.buttons.authorize"), variant: :primary, size: :lg, full_width: true, href: oauth_authorization_path, data: { disable_with: "Authorizing..." } ) %> <% end %> <%= form_tag oauth_authorization_path, method: :delete, class: "w-full", data: { turbo: !turbo_disabled } do %> <%= hidden_field_tag :client_id, @pre_auth.client.uid, id: nil %> <%= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri, id: nil %> <%= hidden_field_tag :state, @pre_auth.state, id: nil %> <%= hidden_field_tag :response_type, @pre_auth.response_type, id: nil %> <%= hidden_field_tag :response_mode, @pre_auth.response_mode, id: nil %> <%= hidden_field_tag :scope, @pre_auth.scope, id: nil %> <%= hidden_field_tag :code_challenge, @pre_auth.code_challenge, id: nil %> <%= hidden_field_tag :code_challenge_method, @pre_auth.code_challenge_method, id: nil %> <% if params[:display].present? %> <%= hidden_field_tag :display, params[:display], id: nil %> <% end %> <%= render DS::Button.new( text: t("doorkeeper.authorizations.buttons.deny"), variant: :outline, size: :lg, full_width: true, href: oauth_authorization_path, data: { disable_with: "Denying..." } ) %> <% end %>

By authorizing, you allow this app to access your <%= product_name %> data according to the permissions above.