Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于JWT_SECRET不生效问题 #22

Closed
Observer5 opened this issue Sep 3, 2021 · 0 comments
Closed

关于JWT_SECRET不生效问题 #22

Observer5 opened this issue Sep 3, 2021 · 0 comments

Comments

@Observer5
Copy link

Observer5 commented Sep 3, 2021

image

配置
JWT_ALGO=HS256

配置
JWT_SECRET='IikK0I6LuPQg3vphKKTnIG9WtgYqPpRo7EN3ZsWUePi3VUDDhjSTBgJWPH6BCP3F'

生成token
$this->jwt->fromUser(User::first());

配置
JWT_SECRET=''

通过http请求将上边的token传入,验证token
$t = $this->jwt->check();

$t为true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant