● videoAuthentication
Using Passwordless Login

Unlock Revisiting Ruby on Rails
Subscribe for full access to every course, or buy this one on its own.
SECTION
Authentication
NEXT UP
Logging Out and Registering On the Fly
COURSE
Rails Revisited
33 lessons
About this lesson
We could probably write this ourselves, but I've used the the devise-passwordless gem before and it works really well. Setting it up is a matter of following the instructions on the GitHub page, but make sure you also setup your mail settings as shown in the video:
config.action_mailer.raise_delivery_errors = <span class="hljs-literal">true</span>
config.action_mailer.default_url_options = { <span class="hljs-symbol">host:</span> <span class="hljs-string">'localhost'</span>, <span class="hljs-symbol">port:</span> <span class="hljs-number">3000</span> }
config.action_mailer.perform_caching = <span class="hljs-literal">false</span>
config.action_mailer.smtp_settings = {
<span class="hljs-symbol">address:</span> <span class="hljs-variable constant_">ENV</span>[<span class="hljs-string">'AWS_SES_HOST'</span>],
<span class="hljs-symbol">user_name:</span> <span class="hljs-variable constant_">ENV</span>[<span class="hljs-string">'AWS_SES_USER'</span>],
<span class="hljs-symbol">password:</span> <span class="hljs-variable constant_">ENV</span>[<span class="hljs-string">'AWS_SES_PASS'</span>],
}
You want to be sure you see any errors on send, so make sure that's enabled. Also: be sure to use Rails secrets or environment settings as I'm doing here.
Unlock Revisiting Ruby on Rails
Subscribe for full access to every course, or buy this one on its own.