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

可以生成RefreshToken吗 #6

Closed
shangeyao opened this issue Jan 27, 2021 · 3 comments
Closed

可以生成RefreshToken吗 #6

shangeyao opened this issue Jan 27, 2021 · 3 comments

Comments

@shangeyao
Copy link

如题

@canren
Copy link
Contributor

canren commented Jan 28, 2021

这种的跟下包的代码就能看到了,刷新 token 的链接,记得在 header 中要携带 Authorization: Bearer {token}

try {
    $token = $this->auth->guard()->refresh();
} catch (\Throwable $throwable) {
    throw new BusinessException(ErrorCode::TOKEN_ERROR);
}

@ericyzhu
Copy link
Member

独立的 RefreshToken 暂无计划,目前的实现如 @canren 所述,通过未过刷新期限的 AccessToken 来换取新 Token。

@shangeyao
Copy link
Author

感谢回答!

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

3 participants