Laravel Passport Multi-Auth

Jeff Simons Decena
1 min readOct 12, 2017

--

Laravel passport is a great package to authenticate your user to your web or mobile app. It uses the OAuth2 package by phpleague underneath. It should solve most of the API developers problem on the authentication side.

While Laravel Passport is useful to most developers, it is still a puzzle on how to authenticate multiple (user) models within it since underneath(by default), it looks on the users table only.

A recent update on the package allows you to specify a custom provider so you can hack a bit on the framework to look on which table in the database.

Check it out in my Github account — https://github.com/jsdecena/laravel-passport-mutiauth

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Jeff Simons Decena
Jeff Simons Decena

Written by Jeff Simons Decena

Senior Fullstack Engineer, React Native developer and HL7 Health Informatics professional

No responses yet

Write a response