'Can we interate socialite with backpack for laravel?

We have the need to login user ONLY via OpenId (exactly Microsoft Azure AD OpenId Connect).

We understand how to use Socialite but we would like to integrate with Backpack For Laravel, because app is 90% base cruds and because we already have a paid licence.

How to integrate socialite with backpack for laravel?

  • Also ... we should integrate it with laravel-permissions that it's very easy to integrate with backpack for laravel


Solution 1:[1]

If you need socialite, I recommend not using the Backpack authentication at all. Just disable everything related to authentication in your config/backpack/base.php file (the routes mainly), code your own controller logic with socialite and plug in your own auth middleware and guard within that same config file, so that Backpack uses your auth instead of the default one.

It will be easier to code and maintain your own logic, rather than mangling the default auth to work the way you want it.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 tabacitu