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

Login the first time redirect to React-admin welcome page

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
react, typescript
Lĩnh vực
authentication, frontend

Hướng nghiên cứu

Bắt đầu bằng cách clone repository tái hiện được liên kết và làm theo README.md của repository đó. Kiểm tra luồng đăng nhập HydraAdmin, kiểm tra authProvider checkAuth() và adminDataProvider introspect(); hoàn tất nghĩa là lần đăng nhập đầu tiên đi tới giao diện resources mà không hiển thị trang chào mừng của React-admin hoặc lỗi console đã được báo cáo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

API Platform version(s) affected: 3.2.2
@api-platform/admin: 3.4.4

Description
My context: I have a JWT protected API, and a protected Hydra-admin with a custom authProvider and the requireAuth set to true.

<HydraAdmin
      requireAuth
      entrypoint={window.origin}
      dataProvider={dataProvider}
      authProvider={authProvider}
/>

The first time I go to my admin app (https://localhost/admin), I'm redirected to the login page (https://localhost/admin#/login). No problem here.
I log in and I'm redirected to the welcome React-admin page instead of the resources view.

How to reproduce
You can clone this repository https://github.com/adguernier/api-platform-auth-provider and follow the README.md

Possible Solution
It seems the adminDataProvider introspect() method does not check the authProvider checkAuth() method.

Additional Context
The first time the login page is render, an error occurred in the console:
image

The dataProvider I've written uses the Bearer token as described in your example

An example is worth a thousand words

https://github.com/api-platform/admin/assets/7949510/153e9e78-4632-4712-80c5-540d5bdd3331

Ngôn ngữ chính
TypeScript
Star
516
Fork
134
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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 api-platform/admin

Tất cả issue của api-platform/admin

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.