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,