FirebaseExtended / FirebaseExtended/reactfire
`validateCustomClaims` is not re-run when the user claims changes
- 主要语言
- TypeScript
- 星标
- 3.6k
- 派生
- 403
- 平均合并
- 14 小时 53 分钟
- 30 天内合并 PR
- 5
描述
### Version info
**React:** 17.0.2
**Firebase:** 9.6.1
**ReactFire:** 4.2.1
**Other (e.g. Node, browser, operating system) (if applicable):**
### Test case
```js
const ExamleComponent = () => {
const { data: { hasRequiredClaims } = {} } = useSigninCheck({
validateCustomClaims: (claims) => {
return {
hasRequiredClaims: claims.role === 'admin'
}
}
})
return
}
```
### Steps to reproduce
Add the above call to a React component and login a user with custom claims that match the condition. Trigger a re-render on the above component.
### Expected behavior
Value of `hasRequiredClaims` changes after user is logged in to accurately reflect condition.
### Actual behavior
Value of `hasRequiredClaims` does not change even after the component is re-rendered.
贡献指南
评估
这个 Issue 还没有评估数据。