I am using Passport Package for the API requests. It was working fine with my old server and the request was authenticated but since I have moved my application to a newer server I am receiving Invalid Token Error. Been searching on the google from last 2 days but didn't find any solution.
The API successfully returning me the token but when I am using that token to authenticate the user it gives me "Unauthenticated" error and redirects me to Home.
Everything is working fine on my old server. Not sure what to change to get this working. Any help will be appreciated.
Try to create new client credentials
Or regenerate the keys
Check webServer probably it does not forward auth headers to php backend
RewriteEngine On RewriteCond %{HTTP:Authorization} .+ RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]