import { ExchangeKeyEnum, ProviderEnum, TokenScope } from '@dynamic-labs/sdk-api-core'; import { SocialAuthMode } from '../../hooks/useSocialAuth'; import { PayWithDynamicProps } from '../../hooks/usePayWithDynamic/usePayWithDynamic'; export declare const SOCIAL_STORAGE_KEY = "dynamic_social_storage"; export type SocialStorageItem = { provider: ProviderEnum; /** SSO provider id */ dynamicOauthSsoProviderId: string | undefined; /** State issued to IDP on social authentication */ state: string; /** Code verifier used to generate the code challenge for PKCE */ codeVerifier: string | undefined; /** Captcha token used to verify the user is not a bot */ captchaToken?: string; /** Oauth code from redirect from oauth provider, this will be provided on response from redirect endpoint **/ code?: string; /** Social auth mode, either sign-in or link */ mode: SocialAuthMode; /** Whether to show the widget after a connection is made */ showWidgetAfterConnection?: boolean; /** What exchange if any should immediately start funding */ triggerFundFromExchangeOnSuccess?: ExchangeKeyEnum; /** * If this is true, then we will pass in additional props and hide back button */ payingWithDynamic?: PayWithDynamicProps; /** * Whether the sign-in was initiated via the headless hook `signInWithSocialAccount`. * Used by the redirect handler to avoid opening the standard widget UI. */ isHeadlessSocialSignIn?: boolean; /** Requested scopes for step-up authentication; persisted so redirect fallback can resume the flow */ requestedScopes?: TokenScope[]; }; export type SocialStorage = Partial>; export declare const searchSocialStorageByState: (targetState: string) => SocialStorageItem | undefined; export declare const setSocialStorageFor: (provider: ProviderEnum, socialStorageItem: Omit) => void; export declare const deleteSocialStorage: (provider: ProviderEnum) => void;