Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jeffwilcox opened this issue Mar 30, 2021 · 3 comments · May be fixed by #270
Open

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

jeffwilcox opened this issue Mar 30, 2021 · 3 comments · May be fixed by #270
Labels
Type: Bug Something isn't working as documented, or is being fixed typescript Relevant to TypeScript users only

Comments

@jeffwilcox
Copy link

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;
@gr2m gr2m added Type: Bug Something isn't working as documented, or is being fixed typescript Relevant to TypeScript users only labels Mar 30, 2021
@gr2m
Copy link
Contributor

gr2m commented Mar 30, 2021

Hmmm no that was not intended, sorry! I did some changes around the "oauth-user" type, I probably broke something, sorry.

I'm heads down in other work, if you like digging into it please go ahead, if not no worries, I'll get to it eventually

@gr2m gr2m changed the title TS: having to cast to specific Authentication types now TS: having to cast to specific Authentication types since 3.3.0 Mar 30, 2021
@jeffwilcox
Copy link
Author

@gr2m I want to help and will see if I can get that done. I've been trying to stay on your latest releases ASAP and overall we're still doing great things with the stack!

@gr2m
Copy link
Contributor

gr2m commented Mar 31, 2021

I started a PR with a failing test to get this going #270

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as documented, or is being fixed typescript Relevant to TypeScript users only
Projects
None yet
2 participants