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

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

问题描述

我正在使用Passport Package来处理API请求.我的旧服务器运行正常,并且请求已通过身份验证,但是由于我将应用程序移至新服务器,因此收到无效令牌错误.最近2天一直在Google上进行搜索,但未找到任何解决方案.

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天全站免登陆