Merge remote-tracking branch 'pleroma/develop' into feature/disable-account
[akkoma] / lib / pleroma / web / templates / o_auth / o_auth / show.html.eex
1 <%= if get_flash(@conn, :info) do %>
2 <p class="alert alert-info" role="alert"><%= get_flash(@conn, :info) %></p>
3 <% end %>
4 <%= if get_flash(@conn, :error) do %>
5 <p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p>
6 <% end %>
7
8 <h2>OAuth Authorization</h2>
9
10 <%= form_for @conn, o_auth_path(@conn, :authorize), [as: "authorization"], fn f -> %>
11 <div class="input">
12 <%= label f, :name, "Name or email" %>
13 <%= text_input f, :name %>
14 </div>
15 <div class="input">
16 <%= label f, :password, "Password" %>
17 <%= password_input f, :password %>
18 </div>
19
20 <%= render @view_module, "_scopes.html", Map.merge(assigns, %{form: f}) %>
21
22 <%= hidden_input f, :client_id, value: @client_id %>
23 <%= hidden_input f, :response_type, value: @response_type %>
24 <%= hidden_input f, :redirect_uri, value: @redirect_uri %>
25 <%= hidden_input f, :state, value: @state %>
26 <%= submit "Authorize" %>
27 <% end %>
28
29 <%= if Pleroma.Config.oauth_consumer_enabled?() do %>
30 <%= render @view_module, Pleroma.Web.Auth.Authenticator.oauth_consumer_template(), assigns %>
31 <% end %>