Support the ongoing development of Laravel.io →
Authentication

I'm planning on using NodeJS frontend and a Laravel backend for a project. Authentication I am planning on using tokens, so NodeJS will give a cookie to a user that sticks with the user and if the user attempts to login it calls the user service and creates a token for the user, this token will be put into Redis for other services to use to validate. However how would I be able to create this sort of authentication? I was thinking using the Authentication header and sending it in there. What would you guys suggest?

Last updated 3 years ago.
0

I'm using this

https://github.com/tappleby/laravel-auth-token

Its pretty straight forward to implement. The client just needs to pass in X-Auth-Token in the header for every page that requires authentication. Then that package takes the users hashed token, and gets gives the necessary User model to Auth

Last updated 3 years ago.
0

Thank you very much!

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

bweston92 bweston92 Joined 3 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.