Skip to content

Unlink (authData[provider] = null) triggers OAuth code/token validation instead of unlinking #9855

@SNtGog

Description

@SNtGog

New Issue Checklist

Issue Description

When unlinking a provider by saving authData[provider] = null, Parse Server should remove the provider without validation.
In current alpha, if the provider uses an OAuth authorization code flow, the server/adaptor may attempt a code → token validation/exchange during unlink, instead of performing the unlink. This results in unexpected adapter calls, possible errors, or the provider remaining linked.

Steps to reproduce

  1. Configure an auth adapter that uses an authorization code flow (example gpgames).
  2. Link the provider for a user.
  3. Attempt to unlink with authData[gpgames] = null.

Actual Outcome

  • During unlink, the server still invokes adapter validation / code-exchange paths.

Expected Outcome

  • authData[provider] = null should unlink without any provider validation or code/token exchange.

Environment

Server

  • Parse Server version: 8.2.4
  • Operating system: Debian 11
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): Hetzner

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version: 8.0
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): Hetzner

Client

  • SDK (iOS, Android, JavaScript, PHP, Unity, etc): Unity
  • SDK version: 5.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions