Skip to content

AUTHENTICATION_REQUIRED drops redirectURL, so callers can't start web sign-in #489

Open

Description

@leogdion

When CloudKit returns AUTHENTICATION_REQUIRED, the body includes redirectURL: the sign-in URL the client opens to get a web auth token. MistKit maps the response to CloudKitError.authenticationRequired(reason: String?) (Sources/MistKit/CloudKitService/CloudKitError.swift:65) and drops the URL. The top-level ErrorResponse schema in openapi.yaml doesn't decode it either; only the per-record error schema does.

Proposal: add redirectURL to ErrorResponse and carry it on the error, either as .authenticationRequired(reason:redirectURL:) or through an accessor. Add a test with a recorded AUTHENTICATION_REQUIRED body.

Found while building brightdigit/Mistico (vendored at Packages/MistKit, branch mistico from v1.0.0-beta.6). Tracked in brightdigit/Mistico#106.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglibrary-apiLibrary API design

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions