Login the first time redirect to React-admin welcome page
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- react, typescript
- Domain
- authentication, frontend
Research direction
Start by cloning the linked reproduction repository and following its README.md. Inspect the HydraAdmin login flow, the custom authProvider checkAuth(), and adminDataProvider introspect(); done means the first login reaches the resources view without showing the React-admin welcome page or the reported console error.
Written by the indexing model from the issue text.
Description
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:
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
- Dominant language
- TypeScript
- Stars
- 516
- Forks
- 134
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from api-platform/admin
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
api-platform/admin#616 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 64/100
api-platform/admin#660 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 50/100
api-platform/admin#659 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
api-platform/admin#631 · 6 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
api-platform/admin#626 · 1 comment · 1 reaction ·
All issues in api-platform/admin
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
fil-donadoni/tolaria#4409 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
corsairdev/corsair#1764 ·