phoenix_oauth2_provider icon indicating copy to clipboard operation
phoenix_oauth2_provider copied to clipboard

Cleanup form markup for authorization

Open LostKobrakai opened this issue 4 years ago • 0 comments

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 %>

LostKobrakai avatar Sep 23 '19 08:09 LostKobrakai