-
-
Notifications
You must be signed in to change notification settings - Fork 191
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What version of HAPI is running?
hapi version: 0.15.3
What platform is your computer?
Linux 5.15.0-164-generic x86_64 x86_64
What issue are you seeing?
考虑到公网暴露服务的安全性,我使用了caddy+oauth插件的方式将hapi暴露在公网上。
流程如下:
- 浏览器访问地址,oauth插件发现用户未登录/token失效,返回302响应
- 浏览器跟随302响应跳转到登录页
但在使用hapi时,如果用户oauth登录状态过期,页面会停留在token输入页,输入token后会报错“failed to fetch”,而不是跳转到oauth登录页。
What steps can reproduce the bug?
- 启动hapi
- 让后端接口返回302(如oauth失效/手动魔改)
- 打开hapi,输入token
- hapi在前端报错
What is the expected behavior?
解决方案:让hapi能跟随302跳转到登录页
进阶需求:让hapi能配置无需token的鉴权方案,方便oauth场景/localhost场景使用。
Additional information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working