Skip to content

Add OAuth 2.0 error codes constants #307

@pilcrowonpaper

Description

@pilcrowonpaper

Add OAuth2ErrorCodeInvalidRequest (= "invalid_request") etc.

import * as arctic from "arctic";

const client = new arctic.OAuth2Client(/* ... */);

// ...

try {
  await client.validateAuthorizationCode(/* ... */);
} catch (e) {
  if (e instanceof arctic.OAuth2RequestError) {
    if (e.code === arctic.OAuth2ErrorCodeInvalidRequest) {
      // ...
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions