fix(oauth-provider): fix dist declaration type errors (#8701)

This commit is contained in:
Gustavo Valverde
2026-03-20 13:47:24 -07:00
committed by Alex Yang
parent 0cfd514a3d
commit ec79fa2750
4 changed files with 8 additions and 5 deletions
@@ -32,11 +32,14 @@ export const oauthProviderResourceClient = <T extends Auth | undefined>(
}
return jwtPlugin?.options;
};
const getAuthorizationServer = async () => {
const authServerBaseUrl =
typeof auth?.options.baseURL === "string"
? auth.options.baseURL
: undefined;
const getAuthorizationServer = async (): Promise<string | undefined> => {
const jwtPluginOptions = await getJwtPluginOptions();
return jwtPluginOptions?.jwt?.issuer ?? authServerBaseUrl;
};
const authServerBaseUrl = auth?.options.baseURL;
const authServerBasePath = auth?.options.basePath;
return {
+1 -1
View File
@@ -120,7 +120,7 @@ export async function consentEndpoint(
}
ctx?.headers?.set("accept", "application/json");
ctx.query = deleteFromPrompt(query, "consent");
ctx.context.postLogin = true;
(ctx.context as Record<string, unknown>).postLogin = true;
const { url } = await authorizeEndpoint(ctx, opts);
return {
redirect: true,
+1 -1
View File
@@ -446,7 +446,7 @@ export function schemaToOAuth(input: SchemaClient<Scope[]>): OAuthClient {
software_version: softwareVersion ?? undefined,
software_statement: softwareStatement ?? undefined,
// Authentication Metadata
redirect_uris: redirectUris ?? undefined,
redirect_uris: redirectUris ?? [],
post_logout_redirect_uris: postLogoutRedirectUris ?? undefined,
token_endpoint_auth_method: tokenEndpointAuthMethod ?? undefined,
grant_types: grantTypes ?? undefined,
+1 -1
View File
@@ -55,7 +55,7 @@ export const getOAuthProviderPlugin = (ctx: AuthContext) => {
export const getJwtPlugin = (ctx: AuthContext) => {
const plugin = ctx.getPlugin("jwt") satisfies ReturnType<typeof jwt> | null;
if (!plugin) {
throw new BetterAuthError("jwt_config", "jwt plugin not found");
throw new BetterAuthError("jwt_config");
}
return plugin;
};