{"version":3,"file":"StytchClient.mjs","sources":["../../../../../../web/src/StytchClient.ts"],"sourcesContent":["import {\n  checkNotSSR,\n  checkPublicToken,\n  DFPProtectedAuthProvider,\n  HeadlessCryptoWalletClient,\n  HeadlessIDPClient,\n  HeadlessImpersonationClient,\n  HeadlessMagicLinksClient,\n  HeadlessOTPClient,\n  HeadlessPasswordClient,\n  HeadlessRBACClient,\n  HeadlessSessionClient,\n  HeadlessTOTPClient,\n  HeadlessUserClient,\n  HeadlessWebAuthnClient,\n  INetworkClient,\n  logger,\n  SearchDataManager,\n  SessionManager,\n  StateChangeClient,\n  StateChangeRegisterFunction,\n  VERTICAL_B2B,\n} from '@stytch/core';\nimport {\n  ConsumerState,\n  IHeadlessCryptoWalletClient,\n  IHeadlessImpersonationClient,\n  IHeadlessMagicLinksClient,\n  IHeadlessOTPsClient,\n  IHeadlessPasswordClient,\n  IHeadlessRBACClient,\n  IHeadlessSessionClient,\n  IHeadlessTOTPClient,\n  IHeadlessUserClient,\n  IHeadlessWebAuthnClient,\n  StytchClientOptions,\n  StytchProjectConfigurationInput,\n} from '@stytch/core/public';\n\nimport { BootstrapDataManager } from './BootstrapDataManager';\nimport { CaptchaProvider } from './CaptchaProvider';\nimport { ClientsideServicesProvider } from './ClientsideServicesProvider';\nimport { HeadlessOAuthClient, IWebOAuthClient } from './HeadlessOAuthClient';\nimport { NetworkClient } from './NetworkClient';\nimport { OneTapProvider } from './oneTap/OneTapProvider';\nimport { PKCEManager } from './PKCEManager';\nimport {\n  ConsumerSubscriptionDataLayer,\n  ConsumerSubscriptionService,\n  getConsumerDataLayer,\n} from './SubscriptionService';\nimport { buildFinalConfig, hasCustomApiEndpoint } from './utils/config';\nimport { AuthenticateByUrl, createAuthUrlHandler, ParseAuthenticateUrl } from './utils/createAuthUrlHandler';\nimport { writeB2CInternals } from './utils/internal';\n\nexport type HandledTokenType = 'magic_links' | 'oauth' | 'impersonation';\n\n/**\n * A headless client used for invoking the Stytch API.\n * The Stytch Headless Client can be used as a drop-in solution for authentication and session management.\n * Full documentation can be found {@link https://stytch.com/docs/sdks/javascript-sdk online}.\n * @example\n * const stytch = new StytchClient('public-token-<find yours in the stytch dashboard>');\n * stytch.magicLinks.email.loginOrCreate('sandbox@stytch.com', {\n *   login_magic_link_url: 'https://example.com/authenticate',\n *   login_expiration_minutes: 60,\n *   signup_magic_link_url: 'https://example.com/authenticate',\n *   signup_expiration_minutes: 60,\n * });\n */\nexport class StytchClient<\n  TProjectConfiguration extends StytchProjectConfigurationInput = Stytch.DefaultProjectConfiguration,\n> {\n  private readonly _subscriptionService: ConsumerSubscriptionService<TProjectConfiguration>;\n  private readonly _sessionManager: SessionManager<TProjectConfiguration>;\n  private readonly _networkClient: INetworkClient;\n  private readonly _dataLayer: ConsumerSubscriptionDataLayer;\n  private readonly _stateChangeClient: StateChangeClient<ConsumerState>;\n\n  // External API Clients\n  user: IHeadlessUserClient;\n  magicLinks: IHeadlessMagicLinksClient<TProjectConfiguration>;\n  session: IHeadlessSessionClient<TProjectConfiguration>;\n  otps: IHeadlessOTPsClient<TProjectConfiguration>;\n  oauth: IWebOAuthClient<TProjectConfiguration>;\n  cryptoWallets: IHeadlessCryptoWalletClient<TProjectConfiguration>;\n  totps: IHeadlessTOTPClient<TProjectConfiguration>;\n  webauthn: IHeadlessWebAuthnClient<TProjectConfiguration>;\n  passwords: IHeadlessPasswordClient<TProjectConfiguration>;\n  impersonation: IHeadlessImpersonationClient<TProjectConfiguration>;\n  rbac: IHeadlessRBACClient;\n  idp: HeadlessIDPClient;\n\n  // External methods\n  /**\n   * Register a callback function to be invoked whenever certain state changes\n   * occur, like a user or session object being updated.\n   *\n   * This is an alternative to more specific methods like `user.onChange` and\n   * `session.onChange`. It can be helpful if you want to be notified of related\n   * changes to different parts of state at once.\n   *\n   * If you are only interested in specific state changes, consider using more\n   * specific methods like `user.onChange` and `session.onChange` instead.\n   */\n  onStateChange: StateChangeRegisterFunction<ConsumerState>;\n\n  /**\n   * Extracts token and token type from the current page URL's query parameters.\n   * If the current URL do not have the required query params, this will return null.\n   * Otherwise, returns an object { handled: boolean, tokenType: string, token: string }\n   */\n  parseAuthenticateUrl: ParseAuthenticateUrl<HandledTokenType>;\n\n  /**\n   * Call this method to authenticate the user when the user has been redirected\n   * to this page with a token in the query parameters, such as after OAuth\n   * or through an email magic link. This method currently supports\n   *\n   * - Magic links\n   * - OAuth\n   * - Impersonation\n   *\n   * Returns null if token or stytch_token_type query parameters are not present,\n   * or returns an unhandled result if the token type is not recognized.\n   */\n  authenticateByUrl: AuthenticateByUrl<HandledTokenType>;\n\n  constructor(publicTokenRaw: string, options?: StytchClientOptions) {\n    checkNotSSR();\n\n    // Intentionally check the raw public token so that we can log a correct error message,\n    // but then coalesce to an empty string so that the UI components don't fail to render.\n    checkPublicToken(publicTokenRaw);\n    const _PUBLIC_TOKEN = publicTokenRaw ?? '';\n\n    // Not casting to InternalStytchClientOptions since InternalStytchClientOptions is currently a superset\n    const config = buildFinalConfig(this.constructor.name, options);\n    const usingCustomApiEndpoint = hasCustomApiEndpoint(_PUBLIC_TOKEN, options);\n\n    this._dataLayer = getConsumerDataLayer(_PUBLIC_TOKEN, config);\n    this._subscriptionService = new ConsumerSubscriptionService(_PUBLIC_TOKEN, this._dataLayer, {\n      usingCustomApiEndpoint,\n    });\n    this._stateChangeClient = new StateChangeClient(this._subscriptionService, {});\n    this.onStateChange = (...args) => this._stateChangeClient.onStateChange(...args);\n\n    const additionalTelemetryDataFn = () => ({\n      stytch_user_id: this._dataLayer.state?.user?.user_id,\n      stytch_session_id: this._dataLayer.state?.session?.session_id,\n    });\n\n    const passwordsPKCEManager = new PKCEManager(this._dataLayer, 'passwords');\n    const networkClient = new NetworkClient(\n      _PUBLIC_TOKEN,\n      this._dataLayer,\n      config.endpoints.liveAPIURL,\n      config.endpoints.testAPIURL,\n      additionalTelemetryDataFn,\n    );\n    this._networkClient = networkClient;\n\n    const bootstrap = new BootstrapDataManager(_PUBLIC_TOKEN, this._networkClient, this._dataLayer);\n    const captcha = new CaptchaProvider(bootstrap.getAsync());\n    const dfpProtectedAuth = new DFPProtectedAuthProvider(\n      _PUBLIC_TOKEN,\n      config.endpoints.dfpBackendURL,\n      config.endpoints.dfpCdnURL,\n      bootstrap.getAsync(),\n      captcha.executeRecaptcha,\n    );\n    const clientsideServices = new ClientsideServicesProvider(config.endpoints.clientsideServicesIframeURL);\n    const oneTap = new OneTapProvider(_PUBLIC_TOKEN, clientsideServices);\n    const searchManager = new SearchDataManager(this._networkClient, dfpProtectedAuth);\n\n    this.user = new HeadlessUserClient(this._networkClient, this._subscriptionService);\n    this.session = new HeadlessSessionClient(this._networkClient, this._subscriptionService);\n    this.magicLinks = new HeadlessMagicLinksClient(\n      this._networkClient,\n      this._subscriptionService,\n      new PKCEManager(this._dataLayer, 'magic_links'),\n      passwordsPKCEManager,\n      bootstrap.getAsync(),\n      dfpProtectedAuth,\n    );\n    this.otps = new HeadlessOTPClient(\n      this._networkClient,\n      this._subscriptionService,\n      captcha.executeRecaptcha,\n      dfpProtectedAuth,\n    );\n    this.oauth = new HeadlessOAuthClient(\n      this._networkClient,\n      this._subscriptionService,\n      new PKCEManager(this._dataLayer, 'oauth'),\n      bootstrap.getAsync(),\n      {\n        publicToken: _PUBLIC_TOKEN,\n        testAPIURL: config.endpoints.testAPIURL,\n        liveAPIURL: config.endpoints.liveAPIURL,\n      },\n      oneTap,\n    );\n    this.cryptoWallets = new HeadlessCryptoWalletClient(\n      this._networkClient,\n      this._networkClient,\n      this._subscriptionService,\n      captcha.executeRecaptcha,\n      dfpProtectedAuth,\n      bootstrap.getAsync(),\n    );\n    this.totps = new HeadlessTOTPClient(this._networkClient, this._subscriptionService, dfpProtectedAuth);\n    this.webauthn = new HeadlessWebAuthnClient(this._networkClient, this._subscriptionService, dfpProtectedAuth);\n    this.passwords = new HeadlessPasswordClient(\n      this._networkClient,\n      this._subscriptionService,\n      passwordsPKCEManager,\n      bootstrap.getAsync(),\n      dfpProtectedAuth,\n    );\n    this.impersonation = new HeadlessImpersonationClient(\n      this._networkClient,\n      this._subscriptionService,\n      dfpProtectedAuth,\n    );\n\n    this.rbac = new HeadlessRBACClient(bootstrap.getSync(), bootstrap.getAsync(), this._subscriptionService);\n    this.idp = new HeadlessIDPClient(this._networkClient);\n    this._sessionManager = new SessionManager(this._subscriptionService, this.session, _PUBLIC_TOKEN, {\n      keepSessionAlive: config.keepSessionAlive,\n    });\n\n    // If the session does not exist in localstorage (like if we are in an iframe)\n    // then the cookie might still be set and we can retrieve the session via an API call.\n    // If a custom API endpoint is being used, the session may be being managed by\n    // HttpOnly cookies, which we can't detect.\n    if (usingCustomApiEndpoint || this._dataLayer.readSessionCookie().session_token) {\n      this._sessionManager.performBackgroundRefresh();\n    }\n\n    this._networkClient.logEvent({\n      name: 'sdk_instance_instantiated',\n      details: {\n        event_callback_registered: false,\n        error_callback_registered: false,\n        success_callback_registered: false,\n      },\n    });\n\n    bootstrap.getAsync().then((bootstrapData) => {\n      if (bootstrapData.vertical === VERTICAL_B2B) {\n        logger.error(\n          'This application is using a Stytch client for Consumer projects, but the public token is for a Stytch B2B project. Use a B2B Stytch client instead, or verify that the public token is correct.',\n        );\n      }\n    });\n\n    const { authenticateByUrl, parseAuthenticateUrl } = createAuthUrlHandler({\n      magic_links: (token, options) => this.magicLinks.authenticate(token, options),\n      oauth: (token, options) => this.oauth.authenticate(token, options),\n      impersonation: (token: string) => this.impersonation.authenticate({ impersonation_token: token }),\n    });\n\n    this.authenticateByUrl = authenticateByUrl;\n    this.parseAuthenticateUrl = parseAuthenticateUrl;\n\n    writeB2CInternals(this, {\n      bootstrap,\n      clientsideServices,\n      captcha,\n      oneTap,\n      searchManager,\n      publicToken: _PUBLIC_TOKEN,\n      dataLayer: this._dataLayer,\n      networkClient: this._networkClient,\n    });\n  }\n}\n"],"names":["StytchClient","_subscriptionService","_sessionManager","_networkClient","_dataLayer","_stateChangeClient","user","magicLinks","session","otps","oauth","cryptoWallets","totps","webauthn","passwords","impersonation","rbac","idp","onStateChange","parseAuthenticateUrl","authenticateByUrl","publicTokenRaw","options","checkNotSSR","checkPublicToken","_PUBLIC_TOKEN","config","buildFinalConfig","name","usingCustomApiEndpoint","hasCustomApiEndpoint","getConsumerDataLayer","ConsumerSubscriptionService","StateChangeClient","args","additionalTelemetryDataFn","stytch_user_id","state","user_id","stytch_session_id","session_id","passwordsPKCEManager","PKCEManager","networkClient","NetworkClient","endpoints","liveAPIURL","testAPIURL","bootstrap","BootstrapDataManager","captcha","CaptchaProvider","getAsync","dfpProtectedAuth","DFPProtectedAuthProvider","dfpBackendURL","dfpCdnURL","executeRecaptcha","clientsideServices","ClientsideServicesProvider","clientsideServicesIframeURL","oneTap","OneTapProvider","searchManager","SearchDataManager","HeadlessUserClient","HeadlessSessionClient","HeadlessMagicLinksClient","HeadlessOTPClient","HeadlessOAuthClient","publicToken","HeadlessCryptoWalletClient","HeadlessTOTPClient","HeadlessWebAuthnClient","HeadlessPasswordClient","HeadlessImpersonationClient","HeadlessRBACClient","getSync","HeadlessIDPClient","SessionManager","keepSessionAlive","readSessionCookie","session_token","performBackgroundRefresh","logEvent","details","event_callback_registered","error_callback_registered","success_callback_registered","then","bootstrapData","vertical","VERTICAL_B2B","logger","error","createAuthUrlHandler","magic_links","token","authenticate","impersonation_token","writeB2CInternals","dataLayer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDA;;;;;;;;;;;;AAYC,IACM,MAAMA,YAAAA,CAAAA;IAGMC,oBAAAA;IACAC,eAAAA;IACAC,cAAAA;IACAC,UAAAA;IACAC,kBAAAA;;IAGjBC,IAAAA;IACAC,UAAAA;IACAC,OAAAA;IACAC,IAAAA;IACAC,KAAAA;IACAC,aAAAA;IACAC,KAAAA;IACAC,QAAAA;IACAC,SAAAA;IACAC,aAAAA;IACAC,IAAAA;IACAC,GAAAA;;AAGA;;;;;;;;;;AAUC,MACDC,aAAAA;AAEA;;;;AAIC,MACDC,oBAAAA;AAEA;;;;;;;;;;;AAWC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