Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Authentication (Passport) #9

Open
mansouralex opened this issue Sep 29, 2016 · 10 comments
Open

API Authentication (Passport) #9

mansouralex opened this issue Sep 29, 2016 · 10 comments

Comments

@mansouralex
Copy link

Can we use it with Laravel 5.3 API Authentication (Passport) ?

@Hesto
Copy link
Owner

Hesto commented Sep 29, 2016

I think we can because Passport use api guard with Passport driver instead of default api driver. There is no conflict but you have to try it yourself. When you try write it in this topic please.

@Hesto Hesto closed this as completed Oct 11, 2016
@mansouralex
Copy link
Author

@Hesto just tried it and I'm getting invalid_credentials error response when trying the api guard with the new created provider but It works ok when using the users provider.

Any tips you suggest for this issue?

Also, How we can define multiple api guards in auth.guards array?

Thanks.

@Hesto
Copy link
Owner

Hesto commented Oct 19, 2016

I will test the package with Passport soon.

@Hesto Hesto reopened this Oct 19, 2016
@SidharthRaveendran
Copy link

Passport package isn't built with Multi-Auth in mind, how can we use it for our purpose ?

@samirgit
Copy link

samirgit commented Nov 14, 2016

@mansouralex multiple guards are not enabled for the reason is inside Laravel\Passport\Bridge\UserRepository getUserEntityByUserCredentials() function
'auth.providers.users.model' is hardcoded, so there is no way to escape using it.

i am using laravel voyager the new admin panel, and my way around it is to change the default guard.

default new guard for voyager (admin panel)
usual guards (web, api) for passports (apis)

@mansouralex
Copy link
Author

@samirgit thanks for your reply. Yes I noticed that, for the moment we can use JWT for this purpose.

@EmadAdly
Copy link

EmadAdly commented May 3, 2017

hey guys,
anyone tested this package for working together with passport.

thanks.

@MohammedSabbah
Copy link

Hi all, see this.
It worked for me.

@jsdecena
Copy link

Hello, I have created a small package for this: https://github.com/jsdecena/laravel-passport-mutiauth Hope it helps :)

@khaledmah
Copy link

after install passport and all configurations run this command php artisan config:cache and will use your providers you selected to use it this worked with me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants