Skip to content

Instantly share code, notes, and snippets.

@stevesohcot
Created January 30, 2016 19:20
Show Gist options
  • Save stevesohcot/de351fd1e5038180d367 to your computer and use it in GitHub Desktop.
Save stevesohcot/de351fd1e5038180d367 to your computer and use it in GitHub Desktop.
OmniAuth - Sessions NEW
# NOTE: this uses Bootstrap for styling
# and there's some extra javascript validation
<%= form_tag('/auth/identity/callback') do %>
<header align="center" style="margin-bottom:15px;">
<h2>Log In</h2>
</header>
<div style="width:80%; margin:auto;">
<div class="input-group input-group-lg form-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<%= label_tag :email, "Email", :class=> 'sr-only' %>
<%= email_field_tag(:auth_key, nil, :class=> 'form-control input-lg', :placeholder=> 'Email Address', :autofocus=>true, :data=> {"lowercase" => true, 'required' => true} ) %>
</div>
<div class="input-group input-group-lg form-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<%= label_tag :password, "Password", :class=> 'sr-only'%>
<%= password_field_tag(:password, nil, :class=> 'form-control input-lg', :placeholder =>'Password', :data=> {'required' => true } ) %>
</div>
<div class="form-group">
<%= submit_tag 'Log In', :class => "btn btn-primary btn-lg", onClick: "return ValidateRequired();" %>
<%= link_to "Sign Up", signup_path, :class => "btn btn-default btn-lg" %>
</div>
</div>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment