export interface UseOAuthSignInReturn { /** Initiate OAuth sign-in / sign-up (unauthenticated). */ initiateOAuth: ({ provider, redirectAfterAuth }: { provider: string; redirectAfterAuth?: string; }) => Promise; /** Link a new OAuth provider to the current authenticated user. */ linkOAuthProvider: ({ provider, redirectAfterAuth }: { provider: string; redirectAfterAuth?: string; }) => Promise; /** No-op on mobile (the deep-link result is resolved inline). Always returns false. */ handleOAuthCallback: () => boolean; isLoading: boolean; error: string | null; } /** * Expo hook for OAuth sign-in and identity linking. * * Opens the Sublay-brokered provider consent screen in the system browser via * `expo-web-browser` and receives the result through a custom-scheme deep link. * API-compatible with the web `@sublay/react-js` hook, with two mobile deltas: * - `redirectAfterAuth` is REQUIRED (there is no `window.location` default). * - `handleOAuthCallback` is a no-op shim returning `false` — the redirect is * resolved inline by `openAuthSessionAsync`, not on a separate callback page. * * Token persistence is automatic: the dispatched tokens are picked up by the * `AccountManager` (via `useAccountSync`) and written to SecureStore. * * Usage (sign-in): * const { initiateOAuth } = useOAuthSignIn(); * await initiateOAuth({ provider: "google", redirectAfterAuth: "myapp://auth/callback" }); * * Usage (link provider to current user): * const { linkOAuthProvider } = useOAuthSignIn(); * await linkOAuthProvider({ provider: "github", redirectAfterAuth: "myapp://settings" }); */ declare function useOAuthSignIn(): UseOAuthSignInReturn; export default useOAuthSignIn;