FirebaseExtended / FirebaseExtended/reactfire

`validateCustomClaims` is not re-run when the user claims changes

オープン
#493 コメント 3 件 リアクション 0 件 担当者 1 名 @jhuleatt が担当を希望しています GitHub で見る
v5
主要言語
TypeScript
スター
3.6k
フォーク
403
平均マージ
14時間 53分
マージ済み PR(30日)
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

{hasRequiredClaims}

}
```

### 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 はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。