Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

ReferenceField not using custom data provider

Open
#504 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
react, typescript
Domain
api, frontend

Research direction

Start by tracing ReferenceField calls through the Hydra data provider and comparing them with the custom data provider used by show and edit pages. Confirm whether ReferenceField triggers both providers; done means its API requests use the custom provider and include the authentication headers without an unauthenticated duplicate call.

Written by the indexing model from the issue text.

Description

Description
I've extended the Hydra data provider to add authenticatino headers.
My dataprovider adds auth headers to ALL api calls. I need to use supabase auth headers for the API authentication.
This works fine for all show/edit pages etc.

I'm expecting all components to use this data provider.

But when using ReferenceField in either show or create/edit pages, these custom headers are not passed to the calls.
After doing some debuggin with console.logs, it appears that this component does not even call the custom dataprovider, but the built in data provider. Therefore, all these components cause request errors because the API returns 401. The data does appear, so it seems to be doing multiple API calls. One with the custom data provider, and one without.

After checking with the ReactAdmin team, it turns out this is probably related to the default Hydra Data Provider.
Can this be checked?

Reference: https://github.com/marmelab/react-admin/issues/8883

Dominant language
TypeScript
Stars
516
Forks
134
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from api-platform/admin

All issues in api-platform/admin

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.