Skip to content
Advertisement

Tag: laravel-passport

How to implement authentication & authorization between microservices & API Gateway using Laravel

I’m trying to implement authentication & authorization of users between my microservices and API Gateway.What I have now: API Gateway which can request to any microservice. User microservice – where I’m storing all users. laravel/passport implemented to authenticate user in this microservice. Works as it should be, login route returns token which I’m using to authenticate user in this microservice.

Bad hostname provided

Passport Version: ^10.1 Laravel Version: 8.77.1 PHP Version: 8.0.9 Database Driver & Version: mysql 8.0.27 I can not get access token. when I call it manual by curl it get this response. this host name is generate inside the docker container I’m test 192.168.224.6 ip of docker container but it also not work Answer if you don’t use any prefix

Laravel Passport callback route returns null

I am learning Laravel Passport and developing an OAuth2 server. After creating a client I made the following call to get the authorization code The call works as expected and I got the authorization code, however when redirecting to the callback route which is defined like so It didn’t work, the response instance is just null. I can’t figure out

Laravel: Authenticate an Authenticatable Model statelessly

I need help. Current situation, I have a Company model. That company model refers to a Client Credentials grant OAuth Client (passport). I managed to make a middleware that resolves the current Company from request via the passed bearer token of the API request. The problem: I want to set that Company instance as the currently authenticated user statelessly. In

Advertisement