You can use Socialite for all OAuth compliant services. For services that are not supported out of the box, no existing drivers, you can check https://socialiteproviders.com. If you can not find it there then you can search GitHub/Packagist or create one following the guidelines.
Any Socialite / SSO Experts?
So the application I'm working on currently supports Facebook/Google login via Laravel Socialite and it feels really clean.
I love that with a tiny bit of boilerplate code to setup configuration, I can write this code on the way out:
Socialite::driver('facebook')->redirect();
.. and this code on the way back in:
$user = Socialite::driver('facebook')->stateless()->user();
And the rest is just simple logic within my own domain to link the user to one or many provider tokens.
The question: can I use Socialite for all of my Single-Sign On needs?
If a client comes along and demands that users must be able to login with their Amazon Cognito account or Azure AD or Cloud Identity or maybe they want to use their own database of users for authentication -- could I simply extend Socialite by creating a custom driver for each of those services?
What I'm really asking is, without getting my hands dirty, how flexible/easy to extend is Socialite - does it only work if the IdP supports OAuth2 -- what about SAML or a custom API for authentication? My head is hurting from reading up on all of this stuff as it's brand new to me.
Hey @joeyrush, I found this thread, because I try to use Cognito with Socialite as well. It seems that Cognito supports OAuth2. And I found a Socialite Provider for Cognito on Github. You can find it here: https://github.com/kirschbaum-development/laravel-socialite-cognito I did not test it out yet. But reading the docs made a promising impression.
Regarding SAML: There is a SAML Provider on https://socialiteproviders.com/Saml2/ Maybe that helps you out.
But I have no clue if and how a totally auth custom solution could. But I guess so. Socialite seems pretty extendable via the Providers extension.
Please or to participate in this conversation.