Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#493 3 bình luận 0 reaction 1 người được giao Xem trên GitHub

@jhuleatt đang làm issue này rồi.

Từ ngày 17/8/2022.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

v5
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
const ExamleComponent = () => {
    const { data: { hasRequiredClaims } = {} } =  useSigninCheck({
        validateCustomClaims: (claims) => {
            return {
                hasRequiredClaims: claims.role === 'admin'
            }
        }
    })
     
    return <div>{hasRequiredClaims}</div>
}
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.

Ngôn ngữ chính
TypeScript
Star
3.6k
Fork
403
Merge trung bình
5 ngày 1 giờ
Pull request đã merge (30 ngày)
10

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của FirebaseExtended/reactfire

Tất cả issue của FirebaseExtended/reactfire

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.