[#923] OAuth: prototype of sign in / sign up with Twitter.
This commit is contained in:
parent
63ab61ed3f
commit
aacbf0f570
10 changed files with 209 additions and 37 deletions
14
lib/pleroma/web/templates/o_auth/o_auth/consumer.html.eex
Normal file
14
lib/pleroma/web/templates/o_auth/o_auth/consumer.html.eex
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<h2>External OAuth Authorization</h2>
|
||||
<%= form_for @conn, o_auth_path(@conn, :request, :twitter), [method: "get"], fn f -> %>
|
||||
<div class="scopes-input">
|
||||
<%= label f, :scope, "Permissions" %>
|
||||
<div class="scopes">
|
||||
<%= text_input f, :scope, value: Enum.join(@available_scopes, " ") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= hidden_input f, :client_id, value: @client_id %>
|
||||
<%= hidden_input f, :redirect_uri, value: @redirect_uri %>
|
||||
<%= hidden_input f, :state, value: @state%>
|
||||
<%= submit "Sign in with Twitter" %>
|
||||
<% end %>
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
<%= submit "Authorize" %>
|
||||
<% end %>
|
||||
|
||||
<br>
|
||||
<%= link to: "/oauth/twitter", class: "alert alert-info" do %>
|
||||
Sign in with Twitter
|
||||
<% end %>
|
||||
<%= if Pleroma.Config.get([:auth, :oauth_consumer_enabled]) do %>
|
||||
<br>
|
||||
<%= render @view_module, "consumer.html", assigns %>
|
||||
<% end %>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue