phoenix_oauth2_provider
phoenix_oauth2_provider copied to clipboard
Cleanup form markup for authorization
Instead of two separate forms you could have one form with many submit buttons:
<%= form_tag "#" do %>
<input type="hidden" name="client_id" value="<%= @params["client_id"] %>" />
<input type="hidden" name="redirect_uri" value="<%= @params["redirect_uri"] %>" />
<input type="hidden" name="state" value="<%= @params["state"] %>" />
<input type="hidden" name="response_type" value="<%= @params["response_type"] %>" />
<input type="hidden" name="scope" value="<%= @params["scope"] %>" />
<%= submit "Authorize", formaction: Routes.oauth_authorization_path(@conn, :create) %>
<%= submit "Deny", name: "_method", value: "delete", formaction: Routes.oauth_authorization_path(@conn, :delete) %>
<% end %>