type Handler = (credentials: any, cb: () => void) => void;
/**
 * A hook that can be used in an OAuth response page. This will process the identity provider's response
 * which should be in the page's query string. If successful then Finsemble will be provided with the
 * returned credentials and the page will be closed. If unsuccessful, then the error will be returned from
 * the hook. The hook returns a cancel() function which can be used to discontinue upon an error.
 *
 * @param handler An optional handler which can run business logic on a successful OAuth transaction. This will
 * run before the window closes. The first parameter will be the OAuth credentials. The second parameter is a
 * callback function which must be run to close the OAuth response window.
 */
export declare const useOAuth: (handler?: Handler) => {
    error: string;
    cancel: () => void;
};
export {};
//# sourceMappingURL=useOAuth.d.ts.map