XF 2.2 Laravel using Xenforo login

Jerimu

Member
Hi Xenforo People,

I was searching for a way to login on a laravel app with my xenforo user.
To achieve this i tried this. https://stackoverflow.com/questions...om-xenforo-database-with-using-several-tables
But didn't get it to work but really want to integrate it so people dont have to use multiple logins.

So some information about the laravel app. I wanted to try it first so its a clean Laravel 8 project wit Laravel jetstream Livewire.
If someone can help me out would be really nice. (And the topics i found about where to old sad enough.)

Greetings,
Jerimu
 

Lukas W.

Well-known member
You can either launch the XenForo app in your laravel project to let XF handle your sessions for you, use the API to send Serverside calls to XF to verify a users credentials and subsequently load their user object or query from the auth table making sure to implement all relevant password algorithms in your laravel project.
 

Jerimu

Member
You can either launch the XenForo app in your laravel project to let XF handle your sessions for you, use the API to send Serverside calls to XF to verify a users credentials and subsequently load their user object or query from the auth table making sure to implement all relevant password algorithms in your laravel project.
And wich is the relevant password algorithm? That’s where i stranded last time.
 

Lukas W.

Well-known member
xf_user_authenticate lists the relevant algorithm for each user in the scheme_class column. The classes are stored in src/XF/Authentication, and future updates could add new ones, as well as 3rd party add-ons providing new schemes that are stored in each individual add-ons directory.
 

dknife

Well-known member
I'm currently making a new Laravel backend and I used my previous XF integration on my site to create new libraries in Laravel to act as XF integrations, including verifying user access and obtaining user information. It's not the same as integrating into the user auth and user model in Laravel, which is maybe what you want. With a general XF class I'm able to hook into any XF functions, including anything provided by addons which is important.
 

Kruzya

Well-known member
Since XF 2.2, in REST API added a method auth/from-session. You can use them for retrieving information about user by cookie xf_session or remember key.
 

Jerimu

Member
I've managed to get the login working. So only the session is needed now.
Since XF 2.2, in REST API added a method auth/from-session. You can use them for retrieving information about user by cookie xf_session or remember key.
This will help with that i think.
 
Top