Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Ok, so I thought user ForgetTheNorm had the solution, but it turns out modifying the locate_conditions breaks sign up. The solution is actually much simpler than I originally thought. Downcase the auth-key BEFORE it is submitted with the form. This is true of everywhere you use the key. For instance, to login or sign up.</p> <pre><code> #login-form &lt;%= form_tag('/auth/identity/callback', :method =&gt; 'post', :id =&gt; 'actual-login-form') do %&gt; &lt;div class="field"&gt; &lt;%= label_tag :auth_key, 'Email' %&gt; &lt;br /&gt; &lt;%= text_field_tag :auth_key, nil, :class =&gt; 'user-auth-field user-auth-key' %&gt; &lt;/div&gt; &lt;div class="field"&gt; &lt;%= label_tag :password %&gt; &lt;br /&gt; &lt;%= password_field_tag :password, nil, :class =&gt; 'user-auth-field' %&gt; &lt;/div&gt; &lt;div class="actions"&gt; &lt;%= submit_tag 'Sign in', :class =&gt; 'btn-default', :id =&gt; 'modal-sign-in' %&gt; &lt;/div&gt; &lt;% end %&gt; #signup-form &lt;%= form_tag('/auth/identity/register', :method =&gt; 'post', :id =&gt; 'actual-signup-form') do %&gt; &lt;%= label_tag(nil, 'Choose your username') %&gt; &lt;%= text_field_tag 'name', nil, :class =&gt; 'signup-form-input', :tabindex =&gt; '1' %&gt; &lt;%= label_tag(:email, 'Your current email address') %&gt; &lt;%= text_field_tag 'email', nil, :class =&gt; 'signup-form-input user-auth-key', :tabindex =&gt; '2' %&gt; &lt;%= label_tag(:password, 'Create a password') %&gt; &lt;input type="password" name="password" id="password" class="signup-form-input" tabindex="3" /&gt; &lt;%= label_tag(:password2, 'Confirm your password') %&gt; &lt;input type="password" name="password_confirmation" id="password_confirmation" class="signup-form-input" tabindex="4" /&gt; &lt;%= submit_tag('Sign Up for Pholder', :id =&gt; 'signup-submit', :tabindex =&gt; '5') %&gt; &lt;% end %&gt; </code></pre> <p>Relevant jQuery/JS:</p> <pre><code> $('#actual-login-form, #actual-signup-form').on('submit', function(){ //lower case auth key (email addresses) for all user validation $(this).find('.user-auth-key').val( $(this).find('.user-auth-key').val().toLowerCase() ) }) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload