Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/appauth-public-types.md
Original file line number Diff line number Diff line change
@@ -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<void> to the fetch Response it already returns at runtime.
7 changes: 5 additions & 2 deletions packages/react-native-app-auth/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export type RegistrationConfiguration = BaseConfiguration & {
dangerouslyAllowInsecureHttpRequests?: boolean;
customHeaders?: CustomHeaders;
additionalHeaders?: AdditionalHeaders;
connectionTimeoutSeconds?: number;
};

export interface RegistrationResponse {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -154,9 +157,9 @@ export function refresh(
): Promise<RefreshResult>;

export function revoke(
config: BaseAuthConfiguration,
config: BaseAuthConfiguration & { clientSecret?: string },
revokeConfig: RevokeConfiguration
): Promise<void>;
): Promise<Response>;

export function logout(
config: EndSessionConfiguration,
Expand Down