I'm using Passport on Laravel 5.5, receiving error when trying to refresh access token - only on production server - local dev environment works fine!
This is the error returned:
{
"error": "invalid_request",
"message": "The refresh token is invalid.",
"hint": "Token is not linked to client"
}
I've verified that the tokens and clients exist on the database, are not expired, have not been revoked, are stored correctly etc.
Because the system is a multi-tenant system (with each tenant having it's own database) I did not create passport clients using the command
php artisan passport:client
instead I copied the passport oauth_clients
table and contents for each tenant - so that each tenant uses the same client credentials for eg logging in from frontend, logging in from app (but with different endpoints).
I'm at a loss as to why it's working fine on my local machine but not production.
Does anyone know what exactly php artisan passport:client
does besides creating a row in oauth_clients
table?
I'm thinking that perhaps something more than just copying the oauth_clients
table contents is needed..
Any advice appreciated! Thanks