Skip to content

SignIn mutation always returns ["invalid"] unless CSRF cookies and headers are set #683

@antonio-war

Description

@antonio-war

When calling the SignIn mutation exactly as described in the official Sorare API documentation, the request consistently fails and returns: "errors": ["invalid"] after investigating, it turns out that for the SignIn mutation to work correctly, the following must already be present:

  • Cookies: _sorare_session_id, csrftoken
  • Header: X-CSRF-Token

However, this creates a chicken-and-egg problem:
SignIn is typically the very first mutation in an application flow when you use APIs, so these cookies and headers are not yet available at that point.

The SignIn mutation should work without requiring CSRF cookies and headers (since it is the entry point of the auth flow), or there should be a documented and supported way to obtain these values before executing mutations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions