JWT-Authentication of mulitple Laravel-APIs with the same token

  jwt, laravel

I have a laravel / angular app secured with tymon/jwt-auth.

Now I need a seperate Laravel (or Lumen) API. I want this API to accept the same tokens as the first one. I assumed that this would work if I would set the same secret and mount the middleware.

It doesn’t. Using a freshly generated token I can query the first API but not the new one. Why is that? Is something else besides the secret used to verify the token?

What would be a good way to make this work? I would not mind to make a completely new authentication.

Source: Laravel

Leave a Reply