Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

iqlas's avatar
Level 4

Use External Authenticator for Jetstream

We have an ERP System (ERPNext) which has authentication API

➜ curl --cookie-jar snowcookie --request POST "http://<base-url>/api/method/login" -H 'Content-Type: application/json' -H 'Accept: application/json' --data-raw "{ \"usr\" : \"<username>\", \"pwd\": \"<password>\" }"

and the response is as follows:

{"message":"Logged In","home_page":"/app","full_name":"Administrator"}

Can I use this authentication in Jetstream instead of creating a userbase in Laravel App again?

Thanks.

0 likes
1 reply
bugsysha's avatar

If that is done through the backend then yes, you can. Just have a simple unsigned big int for your user_id column if the data is scoped to a user without a foreign key. Also just create a middleware that will check for the user and if you get a bad response don't allow the user to progress to the next middleware.

That is the simplest way I could think of at the moment.

Please or to participate in this conversation.