Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Login the first time redirect to React-admin welcome page

オープン
#511 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
react, typescript

調査の方向性

まず、リンクされている再現用リポジトリをクローンし、その README.md に従います。HydraAdmin のログインフロー、カスタム authProvider の checkAuth()、および adminDataProvider の introspect() を調査します。完了とは、最初のログインで React-admin のウェルカムページや報告されたコンソールエラーを表示せずにリソースビューへ到達することです。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
TypeScript
スター
516
フォーク
134
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

api-platform/admin のほかの issue

api-platform/admin の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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