CodeIgniter Forums

Full Version: Accessing Laravel auth library from with CI3
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,

We need to provide single sign on across two systems, one in Laravel 5 and one in CI3. We need to use the Laravel 5 apps auth library (Spatie Laravel Permission https://www.github.com/spatie/laravel-permission) as the authentication library and be able to check the user permissions from within our CI3 application as well. 

I think this should be possible if we use DB sessions in the Laravel app and then include the Laravel auth library via composer in our CI app? I have not used Laravel much myself, so I was hoping someone might have had some experience accessing Laravel functions within CI3, and could point me in the right direction of how to get started? 


Many thanks
I've slowly been migrating off of CI to Symfony and Laravel.

Fortunately, with most symfony and laravel components, it's quite easy. I'd also take a look at this git repo https://github.com/mattstauffer/Torch.

For most symfony based components, simply importing the namespace gives you access to all the functionality.

For Laravel Auth, I'd at least try importing the eloquent models so you can create your User model, and start from there.
(02-20-2019, 08:00 AM)albertleao Wrote: [ -> ]I've slowly been migrating off of CI to Symfony and Laravel.

Fortunately, with most symfony and laravel components, it's quite easy. I'd also take a look at this git repo https://github.com/mattstauffer/Torch.

For most symfony based components, simply importing the namespace gives you access to all the functionality.

For Laravel Auth, I'd at least try importing the eloquent models so you can create your User model, and start from there.

Ok thanks for the tip off about Torch, it looks like a great starting point. When you say create the User model, I'm not sure what you mean, We're after being able to call the auth functions in Laravel from out codeigniter and then make decisions from the response. Is this what you're suggesting, or are you saying something else?

Sorry for my confusion.
Anyone else have any experience with this type of thing?