Packages

Adds helpful extras to Guardian like default mailer support, as well as out of the box controllers and routes

Current section

Files

Jump to
sentinel lib sentinel web templates session new.html.eex
Raw

lib/sentinel/web/templates/session/new.html.eex

<h2>Login</h2>
<%= form_for @changeset, Config.router_helper.auth_path(@conn, :create), fn f -> %>
<%= if @changeset.action do %>
<div class="alert alert-danger">
<p>Oops, something went wrong with your email or password!</p>
</div>
<% end %>
<div class="sentinel form-group">
<%= label f, :email, class: "sentinel control-label" %>
<%= email_input f, :email, class: "sentinel form-control" %>
</div>
<div class="sentinel form-group">
<%= label f, :password, class: "sentinel control-label" %>
<%= password_input f, :password, class: "sentinel form-control" %>
</div>
<div class="sentinel actions form-group">
<%= submit "Submit", class: "sentinel btn btn-primary" %>
</div>
<% end %>
<%= if Enum.any?(@providers) do %>
<p>Or login with one of the following</p>
<ul>
<%= for {provider, request_path} <- @providers do %>
<li>
<a href="<%= request_path %>"><%= String.capitalize(provider) %></a>
</li>
<% end %>
</ul>
<% end %>
<%= render Sentinel.SharedView, "links.html", assigns %>