🚨 Pay Just $95/Year (Save 50%)—Black Friday Deal!

#103 Simple Omniauth without Devise

16/01/2023
rails authentication omniauth oauth2

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: https://github.com/corsego/103-simple-omniauth/commit/f52fd98c7fb6dc3ea61f7b2608d07dfe40ea4130
Text version: https://blog.corsego.com/omniauth-without-devise

PR adding this feature to an app, together with tests: https://github.com/yshmarov/superails/pull/5/files

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

0
Inicia sesión para unirte a la conversación