Skip to content

TS: having to cast to specific Authentication types since 3.3.0 #268

Open
@jeffwilcox

Description

@jeffwilcox

FYI, with the latest released version, I'm needing to cast to the specific type of authentication result now, where before it felt more like a type union... not sure if this is a surprise or not, but wanted to make you aware.

Updated code to build with 3.3.0:

const installationTokenDetails = await installationAppAuth({ type: 'installation' });
const installationToken = (installationTokenDetails as InstallationAccessTokenAuthentication).token;

Before:

const installationTokenDetails = await installationAppAuth({ type: 'installation' });
const installationToken = installationTokenDetails.token;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working as documented, or is being fixedtypescriptRelevant to TypeScript users only

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions