From a1e97faa7226703d93ae634f0710f7b0757dac59 Mon Sep 17 00:00:00 2001 From: Oskar Eichler <62393985+OskarEichler@users.noreply.github.com> Date: Fri, 28 Aug 2026 04:19:00 +0300 Subject: [PATCH] fix(types): expose supported options and the revocation response --- .changeset/appauth-public-types.md | 5 +++++ packages/react-native-app-auth/index.d.ts | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .changeset/appauth-public-types.md diff --git a/.changeset/appauth-public-types.md b/.changeset/appauth-public-types.md new file mode 100644 index 000000000..3a37e5653 --- /dev/null +++ b/.changeset/appauth-public-types.md @@ -0,0 +1,5 @@ +--- +"react-native-app-auth": patch +--- + +Add registration timeout, logout custom-browser options and revocation clientSecret to the declarations. Correct revoke() from Promise to the fetch Response it already returns at runtime. diff --git a/packages/react-native-app-auth/index.d.ts b/packages/react-native-app-auth/index.d.ts index 7ff7ec62b..3eb838735 100644 --- a/packages/react-native-app-auth/index.d.ts +++ b/packages/react-native-app-auth/index.d.ts @@ -42,6 +42,7 @@ export type RegistrationConfiguration = BaseConfiguration & { dangerouslyAllowInsecureHttpRequests?: boolean; customHeaders?: CustomHeaders; additionalHeaders?: AdditionalHeaders; + connectionTimeoutSeconds?: number; }; export interface RegistrationResponse { @@ -97,6 +98,8 @@ export type EndSessionConfiguration = BaseAuthConfiguration & { additionalParameters?: { [name: string]: string }; dangerouslyAllowInsecureHttpRequests?: boolean; iosPrefersEphemeralSession?: boolean; + iosCustomBrowser?: AuthConfiguration['iosCustomBrowser']; + androidAllowCustomBrowsers?: AuthConfiguration['androidAllowCustomBrowsers']; }; export interface AuthorizeResult { @@ -154,9 +157,9 @@ export function refresh( ): Promise; export function revoke( - config: BaseAuthConfiguration, + config: BaseAuthConfiguration & { clientSecret?: string }, revokeConfig: RevokeConfiguration -): Promise; +): Promise; export function logout( config: EndSessionConfiguration,