Sign in via Twitter (WIP).

This commit is contained in:
Ivan Tashkinov 2019-03-11 20:37:26 +03:00
commit 63ab61ed3f
9 changed files with 63 additions and 10 deletions

View file

@ -4,7 +4,9 @@
<%= if get_flash(@conn, :error) do %>
<p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p>
<% end %>
<h2>OAuth Authorization</h2>
<%= form_for @conn, o_auth_path(@conn, :authorize), [as: "authorization"], fn f -> %>
<div class="input">
<%= label f, :name, "Name or email" %>
@ -33,3 +35,8 @@
<%= hidden_input f, :state, value: @state%>
<%= submit "Authorize" %>
<% end %>
<br>
<%= link to: "/oauth/twitter", class: "alert alert-info" do %>
Sign in with Twitter
<% end %>