0

I am trying to use laravel socialite for multiauth system. But the problem is there is only one oAuth available in services.php for google . which is redirecting only one callback URL. For Example I have two type of users admin and customer.

where I can give callback URL for customer?

I tried to make new oAuth inside services.php with name google2.

'google' => [
   'client_id' => 'Google ID,
   'client_secret' => 'google secret', 
    'redirect' => 'http://localhost:8000/admin/google/callback',
  ]
'google2' => [
   'client_id' => 'Google ID,
   'client_secret' => 'google secret', 
   'redirect' => 'http://localhost:8000/customer/google/callback',

]

I want to login in both type of user with google account

Bilal Arshad
  • 531
  • 3
  • 11
  • 33
  • I'm not sure this is a feature provided by socialite. But what happens if I change `customer` to `admin` in the browser query parameter `redirect_uri`? Would I be created and logged in as an admin user? – Adam Rodriguez Aug 02 '19 at 16:20
  • yes.. this callback url is only allowing one type of user. it can come from different url but when callback url will redirect it will redict it to only one type of user – Bilal Arshad Aug 02 '19 at 16:47

0 Answers0