Social login with the Rails 8 auth generator
03-Mar-2025 248
If you're not familiar with it yet, social login is the name given to the implementation of the OAuth2 protocol to authenticate users into an application.
It works by allowing applications to access resources from a third-party (Google, GitHub, LinkedIn, etc.) on behalf of a user without the third-party knowing about the user's credentials for the service in question.
So, when we're talking about “social login”, what it means is that a user can identify itself with our application with a trusted service with a couple of clicks, without the need to think about a password or even think about the account creation beyond those clicks.
When that process happens, the third-party lets us know about the success or failure of the sign-in by using callback URLs that we provide when setting the whole process up.
After a successful sign-in attempt, we can authenticate the user with our application however we see fit: by returning a cookie, an access token, etc.
Social login with the Rails 8 auth generator #ruby #rubydeveloper #rubyonrails #Social #login #Rails #generator https://rubyonrails.ba/link/social-login-with-the-rails-8-auth-generator