Ruby on Rails #103 Simple Omniauth without Devise

16/01/2023 (over 1 year ago)
rails authentication omniauth oauth2 without devise devise alternatives

Previously I’ve covered Github omniauth with Devise.
An even simpler solution would be to sign in via a social login provider (Github) without Devise at all!
Here’s the easiest way to create your whole social authentication solution from zero!

Episode source code:
Text version:

PR adding this feature to an app, together with tests:

0:00 the problem
0:45 github omniauth
3:50 respond to auth callback
6:30 User model
8:39 Store User in session
10:10 Set current_user
11:46 Logout
12:50 user_signed_in?
14:50 require_authentication
16:20 Summary

Sign in to join the conversation