diff --git a/packages/openauth/src/provider/arctic.ts b/packages/openauth/src/provider/arctic.ts index 5310bfac..ad7667a7 100644 --- a/packages/openauth/src/provider/arctic.ts +++ b/packages/openauth/src/provider/arctic.ts @@ -25,7 +25,9 @@ export function ArcticProvider( refreshAccessToken(refreshToken: string): Promise }, config: ArcticProviderOptions, -) { +): Provider<{ + tokenset: OAuth2Tokens +}> { function getClient(c: Context) { const callback = new URL(c.req.url) callback.pathname = callback.pathname.replace(/authorize.*$/, "callback") @@ -64,7 +66,5 @@ export function ArcticProvider( }) }) }, - } satisfies Provider<{ - tokenset: OAuth2Tokens - }> + } } diff --git a/packages/openauth/src/provider/code.ts b/packages/openauth/src/provider/code.ts index 629c485c..4599fa60 100644 --- a/packages/openauth/src/provider/code.ts +++ b/packages/openauth/src/provider/code.ts @@ -103,7 +103,7 @@ export type CodeProviderError = export function CodeProvider< Claims extends Record = Record, ->(config: CodeProviderConfig) { +>(config: CodeProviderConfig): Provider<{ claims: Claims }> { const length = config.length || 6 function generate() { return generateUnbiasedDigits(length) @@ -184,7 +184,7 @@ export function CodeProvider< } }) }, - } satisfies Provider<{ claims: Claims }> + } } export type CodeProviderOptions = Parameters[0] diff --git a/packages/openauth/src/ui/code.tsx b/packages/openauth/src/ui/code.tsx index c1881216..1aa77e67 100644 --- a/packages/openauth/src/ui/code.tsx +++ b/packages/openauth/src/ui/code.tsx @@ -104,7 +104,7 @@ export interface CodeUIOptions { * Creates a UI for the Code provider flow. * @param props - Configure the UI. */ -export function CodeUI(props: CodeUIOptions) { +export function CodeUI(props: CodeUIOptions): CodeProviderOptions { const copy = { ...DEFAULT_COPY, ...props.copy, @@ -205,5 +205,5 @@ export function CodeUI(props: CodeUIOptions) { throw new UnknownStateError() }, - } satisfies CodeProviderOptions + } }