parse-community / parse-community/parse-server
Fetching _User crashes when authData remains after auth provider is removed from config
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
New Issue Checklist
- Report security issues confidentially.
- Any contribution is under this license.
- Before posting search existing issues.
Issue Description
Current alpha crashes on _User fetch when a user object still carries built-in auth data from a provider that used to be configured, but is no longer configured now.
The case:
- server used to have
auth.lineorauth.instagramenabled - some
_Userrows still have_auth_data_lineor_auth_data_instagram - later that auth provider is removed from config
- fetching users now dies in
afterFind(shows as Internal Server Error)
This is not just one provider. It looks like the shared built-in code-auth path, at least with line and instagram.
Steps to reproduce
- Start Parse Server on current
alphawithauth.lineenabled, orauth.instagramenabled. - Create any user through that provider so the
_Userrow gets_auth_data_lineor_auth_data_instagram. - Remove that provider from Parse Server config so
auth.line/auth.instagramis no longer configured. - Restart the server.
- Fetch that user, or open
_Userin Parse Dashboard.
Actual Outcome
- Real server fetches on affected users turns into:
Internal server error.
Expected Outcome
If a built-in auth provider is no longer configured, stale _auth_data_* for that provider should not make _User fetch fail.
Environment
Server
- Parse Server version:
9.8.1-alpha.1 - Operating system:
Ubuntu Desktop 24.0.4 - Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
Local
Database
- System (MongoDB or Postgres):
MongoDB - Database version:
8.0.4 - Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
Local
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
JavaScript - SDK version:
8.5.0
Logs
Server-side symptom when fetching affected users:
Internal server error.
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.
Research direction
Start by reproducing the failure through the _User fetch and inspect the afterFind path shared by the built-in code-auth providers, especially line and instagram. Trace how stale auth_data* is handled when the provider is absent from configuration; done means affected users can be fetched without an internal server error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100