Skip to content

Fetching _User crashes when authData remains after auth provider is removed from config #10526

Description

@swittk

New Issue Checklist

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.line or auth.instagram enabled
  • some _User rows still have _auth_data_line or _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

  1. Start Parse Server on current alpha with auth.line enabled, or auth.instagram enabled.
  2. Create any user through that provider so the _User row gets _auth_data_line or _auth_data_instagram.
  3. Remove that provider from Parse Server config so auth.line / auth.instagram is no longer configured.
  4. Restart the server.
  5. Fetch that user, or open _User in 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions