Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Export OAuth2 token response interfaces #45

Merged

Conversation

marcomuser
Copy link
Contributor

@marcomuser marcomuser commented Feb 17, 2024

The examples in the documentation show that one can extend the TokenResponseBody interface, e.g. to add an id_token for OpenId Connect. However, that interface is not exported from the library. This PR is a tiny fix to export both interfaces which cover the token response types.

@marcomuser marcomuser changed the title Export oauth2 token response interfaces Export OAuth2 token response interfaces Feb 17, 2024
@@ -162,12 +162,12 @@ export class OAuth2RequestError extends Error {
}
}

interface TokenErrorResponseBody {
export interface TokenErrorResponseBody {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is an internal type in that there are no public APIs or generics that use it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I've removed the export. At first I had considered the interface could also be useful externally, but you're right it makes less sense if it is not actually part of the public API.

@pilcrowonpaper pilcrowonpaper merged commit 0ab6015 into pilcrowonpaper:main Feb 17, 2024
@pilcrowonpaper
Copy link
Owner

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants