fix(OIDC): 修复 OIDC 登录回调后登录状态未持久化的问题 - #258
Merged
kklldog merged 1 commit intoSep 18, 2026
Merged
Conversation
- 使用 connect 注入 dispatch,将 OIDC 回调组件接入 umi model - OIDC 登录成功后 dispatch `login/changeLoginStatus`,同步更新全局登录状态 - 补充 dispatch 到 useEffect 依赖数组,避免闭包引用过期 - 导出改为 connect 包裹的组件
Collaborator
|
#258 的修复方案本身没有明显问题,可以正确修复 #257。 关键点是它通过 唯一不足是没有增加回归测试,目前只能防住编译错误,不能防止以后再次遗漏登录态持久化。可以补一个 OIDC 回调组件测试,模拟成功响应后断言 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #257
login/changeLoginStatus,同步更新全局登录状态