护照包裹返回“未经认证"错误 [英] Passport Package returning "Unauthenticated" Error

查看:45
本文介绍了护照包裹返回“未经认证"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 API 请求使用 Passport 包.它在我的旧服务器上运行良好,请求已通过身份验证,但由于我已将应用程序移至较新的服务器,因此我收到无效令牌错误.过去两天一直在谷歌上搜索,但没有找到任何解决方案.

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.

API 成功地将令牌返回给我,但是当我使用该令牌对用户进行身份验证时,它给了我未验证"错误并将我重定向到主页.

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

php artisan passport:client --password

或者重新生成密钥

php artisan passport:keys --force

这篇关于护照包裹返回“未经认证"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆