@corbado/observe 1.7.0 → 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1418,6 +1418,12 @@ declare class OperationFullProvideIdentifierWithCUI extends OperationFull {
1418
1418
  }
1419
1419
 
1420
1420
  type SocialLoginSpecType = "pre-identifier" | "post-identifier";
1421
+ /**
1422
+ * How the attempt began. `button`: the user clicked a provider button and the provider ran in a full-page redirect.
1423
+ * `popup`: the user clicked a provider button and the provider ran in a popup window. `one-tap`: the provider showed
1424
+ * its own prompt (e.g. Google One Tap, a FedCM prompt) and the credential came back in page.
1425
+ */
1426
+ type SocialLoginEntry = "button" | "one-tap" | "popup";
1421
1427
  type SocialLoginGetRedirectUrlStart = {
1422
1428
  provider?: SocialLoginProviderType;
1423
1429
  explicitSpecType?: SocialLoginSpecType;
@@ -1425,11 +1431,15 @@ type SocialLoginGetRedirectUrlStart = {
1425
1431
  type SocialLoginGetRedirectUrlFinished = {};
1426
1432
  type SocialLoginExchangeCodeStart = {
1427
1433
  provider?: SocialLoginProviderType;
1434
+ /** Same as the operation config's `entry`, for callers that report only this step. */
1435
+ entry?: SocialLoginEntry;
1428
1436
  };
1429
1437
  type SocialLoginExchangeCodeFinished = {};
1430
1438
  type SocialLoginOperationConfig = {
1431
1439
  /** The classifier drops the attempt if no spec type arrives on any of its events — supply it here or on a step's start data as soon as known. */
1432
1440
  explicitSpecType?: SocialLoginSpecType;
1441
+ /** How the attempt began; omit for a button click with a full-page redirect. */
1442
+ entry?: SocialLoginEntry;
1433
1443
  };
1434
1444
  declare class SocialLoginOperationFull extends OperationFull {
1435
1445
  readonly getRedirectUrl: StepHelper<SocialLoginGetRedirectUrlStart, SocialLoginGetRedirectUrlFinished>;
@@ -2284,6 +2294,32 @@ declare class CorbadoTracker {
2284
2294
  * ```
2285
2295
  */
2286
2296
  formOperationFull(config: FormOperationConfig): FormOperationFull;
2297
+ /**
2298
+ * Track a social login with an external provider (e.g. Google, Apple).
2299
+ *
2300
+ * @param config - Optional spec type and entry.
2301
+ * @remarks
2302
+ * Set `entry` to how the attempt began: omit it for a provider button with a full-page redirect,
2303
+ * `"popup"` when the provider ran in a popup window, `"one-tap"` when the provider showed its own
2304
+ * prompt (e.g. Google One Tap). A One Tap has no redirect: report only `exchangeCode`, never
2305
+ * `getRedirectUrl`.
2306
+ * @example
2307
+ * ```ts
2308
+ * // Provider button:
2309
+ * const social = tracker.socialLoginOperationFull({ explicitSpecType: "pre-identifier" });
2310
+ * social.getRedirectUrl.start({ provider: "google" });
2311
+ * social.getRedirectUrl.finished({});
2312
+ * // Back from the provider, on the new page load:
2313
+ * const back = tracker.socialLoginOperationFull({ explicitSpecType: "pre-identifier" });
2314
+ * back.exchangeCode.start({ provider: "google" });
2315
+ * back.exchangeCode.finished({});
2316
+ *
2317
+ * // Google One Tap, when the credential arrives in page:
2318
+ * const oneTap = tracker.socialLoginOperationFull({ explicitSpecType: "pre-identifier", entry: "one-tap" });
2319
+ * oneTap.exchangeCode.start({ provider: "google" });
2320
+ * oneTap.exchangeCode.finished({});
2321
+ * ```
2322
+ */
2287
2323
  socialLoginOperationFull(config?: SocialLoginOperationConfig): SocialLoginOperationFull;
2288
2324
  /**
2289
2325
  * Track enterprise SSO (SAML/OIDC) through the organization's identity provider.
@@ -2938,7 +2974,7 @@ declare class EventStore<T = Event> {
2938
2974
  type WebAuthnIdentifierProjector = (value: string) => string | null | undefined;
2939
2975
  /**
2940
2976
  * Optional user identifier projection shared by native WebAuthn capture and network serializers.
2941
- * A missing callback preserves user identifiers. Callbacks should be deterministic across payloads.
2977
+ * A missing callback omits user identifiers. Callbacks should be deterministic across payloads.
2942
2978
  * Credential IDs and encoded attestation/authenticator data are retained unchanged.
2943
2979
  */
2944
2980
  type WebAuthnIdentifierProjectors = {
@@ -2947,10 +2983,10 @@ type WebAuthnIdentifierProjectors = {
2947
2983
  };
2948
2984
  /**
2949
2985
  * Serializes WebAuthn creation options, removing `user.name` and `user.displayName`.
2950
- * Binary values become base64url strings. User IDs are retained unless a projector is supplied.
2986
+ * Binary values become base64url strings. `user.id` is omitted unless a projector is supplied.
2951
2987
  *
2952
2988
  * @param value - Native publicKey options, a JSON object, or JSON text; not an application envelope.
2953
- * @param projectors - Optional synchronous user identifier projection; default identity.
2989
+ * @param projectors - Optional synchronous user identifier projection; default omits user identifiers.
2954
2990
  * @returns JSON text, or undefined for malformed or unserializable input.
2955
2991
  * @remarks Does not mutate input, read blacklisted getters, or call toJSON. No tracker initialization is required.
2956
2992
  * @example
@@ -2962,10 +2998,10 @@ type WebAuthnIdentifierProjectors = {
2962
2998
  declare function sanitizeCreationOptions(value: unknown, projectors?: WebAuthnIdentifierProjectors): string | undefined;
2963
2999
  /**
2964
3000
  * Serializes a registration credential, removing `clientExtensionResults.prf.results`.
2965
- * By default other fields remain, including attestation material and credential IDs. Binary values become base64url strings.
3001
+ * `response.userHandle` is omitted unless a projector is supplied. By default other fields remain, including attestation material and credential IDs. Binary values become base64url strings.
2966
3002
  *
2967
3003
  * @param value - A native registration credential, JSON object, or JSON text; not an application envelope.
2968
- * @param projectors - Optional synchronous user identifier projection; default identity.
3004
+ * @param projectors - Optional synchronous user identifier projection; default omits user identifiers.
2969
3005
  * @returns JSON text, or undefined for malformed or unserializable input.
2970
3006
  * @remarks Does not mutate input, read blacklisted getters, or call toJSON. Encoded attestation and client-data blobs are not decoded or redacted.
2971
3007
  */
@@ -2981,10 +3017,11 @@ declare function sanitizeCreationResponse(value: unknown, projectors?: WebAuthnI
2981
3017
  declare function sanitizeRequestOptions(value: unknown): string | undefined;
2982
3018
  /**
2983
3019
  * Serializes an authentication credential, removing `response.signature` and `clientExtensionResults.prf.results`.
2984
- * By default other fields remain, including credential IDs and user handles. Binary values become base64url strings.
3020
+ * `response.userHandle` is omitted unless a projector is supplied. Other fields remain, including credential IDs.
3021
+ * Binary values become base64url strings.
2985
3022
  *
2986
3023
  * @param value - A native authentication credential, JSON object, or JSON text; not an application envelope.
2987
- * @param projectors - Optional synchronous user identifier projection; default identity.
3024
+ * @param projectors - Optional synchronous user identifier projection; default omits user identifiers.
2988
3025
  * @returns JSON text, or undefined for malformed or unserializable input.
2989
3026
  * @remarks Does not mutate input, read blacklisted getters, or call toJSON. This is a path blacklist, not general-purpose secret detection; encoded client-data blobs are not decoded or redacted.
2990
3027
  */
@@ -3025,4 +3062,4 @@ declare function logInfo(message: string): void;
3025
3062
  declare function logError(message: string): void;
3026
3063
  declare function destroy(): Promise<void>;
3027
3064
 
3028
- export { type AppConfirmationOperationCeremonyTypedError, type AppConfirmationOperationConfig, AppConfirmationOperationFull, type AppConfirmationOperationRetryReason, type AppConfirmationOperationSpecType, type AppConfirmationOperationStart, type AuthDecisionFinished, type AuthDecisionStarted, AuthEventName, type AuthMethodDecisionFinished, type AuthMethodDecisionStarted, type AuthMethodType, type BaseEvent, CEREMONY_LOW_EVENT_TAIL_MS, CONFIG_BOUNDS, CONFIG_REQUEST_HEADER, CONFIG_STORAGE_KEY, type CaptchaOperationConfig, CaptchaOperationFull, type CaptchaOperationSpecType, type ClientCapabilities, type ClientEnvHandleMeta, type ClientEnvHandleMetaSource, type Conversion, CookieStorage, CorbadoTracker, type CreateLoggerOptions, type CustomEvent, DEFAULT_DEVICE_INFO_COLLECTOR_TIMEOUT_MS, DEFAULT_FLUSH_INTERVAL_MS, DEFAULT_MAX_ENTRIES, DEFAULT_MAX_SERIALIZED_LENGTH, DEFAULT_RELIABILITY_CONFIG, DEFAULT_SEQ_LOCK_TIMEOUT_MS, DEFAULT_SESSION_INACTIVITY_MS, type DeviceInfo, type DeviceInfoCollectionError, type DeviceInfoDataWeb, type DeviceType, type EmailLinkContinuationConfig, EmailLinkContinuationOperation, type EmailLinkOperationConfig, EmailLinkOperationFull, type EmailLinkOperationPostResponseStart, type EmailLinkOperationSendStart, type EmailLinkOperationSpecType, type EmailOTPOperationConfig, type EmailOTPOperationPostResponseStart, type EmailOTPOperationSendOTPStart, type EmailOTPOperationSpecType, EmailOtpOperationFull, type ErrorStepOptions, type Event, type EventBatch, type EventBatchMeta, type EventMeta, EventStore, type EventType, type FlowAutoFinished, type FlowDecided, type FlowFinished, type FlowHandle, type FlowReset, type FlowStarted, type FlowType, type FlushReason, type FormOperationConfig, FormOperationFull, type JavaScriptHighEntropy, type KeyOperationConfig, KeyRegistrationOperationFull, KeySigningOperationFull, LocalStorage, type Logger, type LowEvent, type LowEventFieldRole, type LowEventInitiator, type LowEventInputEffect, type LowEventSourceKind, type MultiFlowReset, type MultiFlowStarted, NamespacedStorage, type NormalizedError, OUTBOX_LOCK_NAME, OUTBOX_STORAGE_KEY, type ObserveSdkConfigSnapshot, OperationFull, OperationFullProvideIdentifierWithCUI, type OperationFullProvideIdentifierWithCUIConfig, type OutboxEntry, PROBE_BATCH_MAX_BYTES, PROBE_BATCH_MAX_ITEMS, PROBE_PAYLOAD_MAX_BYTES, PROBE_QUEUE_MAX_BYTES, PROBE_QUEUE_MAX_ITEMS, type PasskeyDeletionDeletionTypedError, type PasskeyDeletionOperationConfig, PasskeyDeletionOperationFull, type PasskeyDeletionUserConfirmationTypedError, type PasskeyEnrollmentCeremonyFinished, type PasskeyEnrollmentCeremonyStart, type PasskeyEnrollmentGetOptionsFinished, type PasskeyEnrollmentGetOptionsStart, type PasskeyEnrollmentOperationConfig, PasskeyEnrollmentOperationFull, type PasskeyEnrollmentPostResponseStart, type PasskeyLoginCUIGetOptionsFinished, type PasskeyLoginCUIGetOptionsStart, type PasskeyLoginCUISpecType, type PasskeyLoginCeremonyFinished, type PasskeyLoginCeremonyStart, type PasskeyLoginClientError, type PasskeyLoginFinish, type PasskeyLoginGetOptionsFinished, type PasskeyLoginGetOptionsStart, type PasskeyLoginOperationConfig, PasskeyLoginOperationFull, type PasskeyLoginPostResponseStart, type PasskeyLoginStartable, type PasskeyLoginSubmitted, type PasskeyOperationEnrollmentExplicitSpecType, type PasskeyOperationLoginExplicitSpecType, type PasswordEnrollmentConfig, PasswordEnrollmentOperationFull, type PasswordEnrollmentTypedError, type PasswordLoginCUICeremonyStart, type PasswordLoginCUIGetOptionsFinished, type PasswordLoginCUIGetOptionsStart, type PasswordLoginCUISpecType, type PasswordLoginCUITypedError, type PasswordLoginConfig, type PasswordLoginExplicitSpecType, PasswordLoginOperationFull, type PasswordLoginTypedError, type PasswordManagerExtension, type PasswordManagerExtensionName, type PredefinedEvent, type ProbeContext, type ProbeEntry, type ProbeInput, type ProvideDataOperationConfig, ProvideDataOperationFull, type ProvideDataOperationPostResponseStart, type ProvideDataOperationSpecType, type ProvideDataOperationStart, type ProvideIdentifierError, type ProvideIdentifierFinish, type ProvideIdentifierPostResponseStart, type ProvideIdentifierSpecType, type ProvideIdentifierStart, type QueueOptions, RAW_ERROR_BOUNDS, type RawErrorEnvelope, RequestQueue, SDK_NAME, SDK_VERSION, type SdkInfo, type SdkReliabilityConfig, type SdkReliabilityConfigOverrides, type SdkRetryConfig, type SerializeRawErrorOptions, SessionStorage, type SetFlowTagsOptions, type SmsOTPOperationConfig, type SmsOTPOperationPostResponseStart, type SmsOTPOperationSpecType, SmsOtpOperationFull, type SocialLoginExchangeCodeFinished, type SocialLoginExchangeCodeStart, type SocialLoginGetRedirectUrlFinished, type SocialLoginGetRedirectUrlStart, type SocialLoginOperationConfig, SocialLoginOperationFull, type SocialLoginProviderType, type SocialLoginSpecType, type SourcePathQueryMode, type SsoLoginExchangeCodeFinished, type SsoLoginExchangeCodeStart, type SsoLoginGetRedirectUrlFinished, type SsoLoginGetRedirectUrlStart, type SsoLoginOperationConfig, SsoLoginOperationFull, type SsoLoginSpecType, type StandaloneDeviceInfoSource, type StepHelper, type StepIdentifier, type StepOptions, type StorageEngine, type SubflowTrigger, type SubflowType, type TelemetryEntry, type TelemetryLevel, type TelemetrySink, type TotpOperationConfig, TotpOperationFull, type TotpOperationPostResponseStart, type TotpOperationSpecType, type TrackerOptions, type Transport, type TransportMakeRequestResponse, type TransportOptions, type TrustedDeviceBindingMetadata, type TrustedDeviceCheckConfig, TrustedDeviceCheckOperationFull, type TrustedDeviceCheckResult, type TrustedDeviceCheckStepResult, type TrustedDeviceCheckTypedError, TrustedDeviceEnrollmentOperationFull, type TrustedDeviceEnrollmentResult, type TrustedDeviceOperationConfig, type TrustedDevicePurpose, type TrustedDeviceStorage, UNLOAD_BUDGET_BYTES, UNLOAD_PROBE_MAX_BYTES, type UserReference, type WebAuthnIdentifierProjector, type WebAuthnIdentifierProjectors, cacheConfig, clearExperiment, clearExperiments, createLogger, destroy, detectPasswordManagerExtensions, getExperiments, getSessionId, getTracker, init, loadCachedConfig, logError, logInfo, namespacedKey, parseReliabilityConfig, resetSession, resolveRawErrorLimits, resolveReliabilityConfig, sanitizeAssertionResponse, sanitizeCreationOptions, sanitizeCreationResponse, sanitizeRequestOptions, serializeRawError, setExperiment, setExperiments, setFlowTags, setUser, telemetry, utf8Length };
3065
+ export { type AppConfirmationOperationCeremonyTypedError, type AppConfirmationOperationConfig, AppConfirmationOperationFull, type AppConfirmationOperationRetryReason, type AppConfirmationOperationSpecType, type AppConfirmationOperationStart, type AuthDecisionFinished, type AuthDecisionStarted, AuthEventName, type AuthMethodDecisionFinished, type AuthMethodDecisionStarted, type AuthMethodType, type BaseEvent, CEREMONY_LOW_EVENT_TAIL_MS, CONFIG_BOUNDS, CONFIG_REQUEST_HEADER, CONFIG_STORAGE_KEY, type CaptchaOperationConfig, CaptchaOperationFull, type CaptchaOperationSpecType, type ClientCapabilities, type ClientEnvHandleMeta, type ClientEnvHandleMetaSource, type Conversion, CookieStorage, CorbadoTracker, type CreateLoggerOptions, type CustomEvent, DEFAULT_DEVICE_INFO_COLLECTOR_TIMEOUT_MS, DEFAULT_FLUSH_INTERVAL_MS, DEFAULT_MAX_ENTRIES, DEFAULT_MAX_SERIALIZED_LENGTH, DEFAULT_RELIABILITY_CONFIG, DEFAULT_SEQ_LOCK_TIMEOUT_MS, DEFAULT_SESSION_INACTIVITY_MS, type DeviceInfo, type DeviceInfoCollectionError, type DeviceInfoDataWeb, type DeviceType, type EmailLinkContinuationConfig, EmailLinkContinuationOperation, type EmailLinkOperationConfig, EmailLinkOperationFull, type EmailLinkOperationPostResponseStart, type EmailLinkOperationSendStart, type EmailLinkOperationSpecType, type EmailOTPOperationConfig, type EmailOTPOperationPostResponseStart, type EmailOTPOperationSendOTPStart, type EmailOTPOperationSpecType, EmailOtpOperationFull, type ErrorStepOptions, type Event, type EventBatch, type EventBatchMeta, type EventMeta, EventStore, type EventType, type FlowAutoFinished, type FlowDecided, type FlowFinished, type FlowHandle, type FlowReset, type FlowStarted, type FlowType, type FlushReason, type FormOperationConfig, FormOperationFull, type JavaScriptHighEntropy, type KeyOperationConfig, KeyRegistrationOperationFull, KeySigningOperationFull, LocalStorage, type Logger, type LowEvent, type LowEventFieldRole, type LowEventInitiator, type LowEventInputEffect, type LowEventSourceKind, type MultiFlowReset, type MultiFlowStarted, NamespacedStorage, type NormalizedError, OUTBOX_LOCK_NAME, OUTBOX_STORAGE_KEY, type ObserveSdkConfigSnapshot, OperationFull, OperationFullProvideIdentifierWithCUI, type OperationFullProvideIdentifierWithCUIConfig, type OutboxEntry, PROBE_BATCH_MAX_BYTES, PROBE_BATCH_MAX_ITEMS, PROBE_PAYLOAD_MAX_BYTES, PROBE_QUEUE_MAX_BYTES, PROBE_QUEUE_MAX_ITEMS, type PasskeyDeletionDeletionTypedError, type PasskeyDeletionOperationConfig, PasskeyDeletionOperationFull, type PasskeyDeletionUserConfirmationTypedError, type PasskeyEnrollmentCeremonyFinished, type PasskeyEnrollmentCeremonyStart, type PasskeyEnrollmentGetOptionsFinished, type PasskeyEnrollmentGetOptionsStart, type PasskeyEnrollmentOperationConfig, PasskeyEnrollmentOperationFull, type PasskeyEnrollmentPostResponseStart, type PasskeyLoginCUIGetOptionsFinished, type PasskeyLoginCUIGetOptionsStart, type PasskeyLoginCUISpecType, type PasskeyLoginCeremonyFinished, type PasskeyLoginCeremonyStart, type PasskeyLoginClientError, type PasskeyLoginFinish, type PasskeyLoginGetOptionsFinished, type PasskeyLoginGetOptionsStart, type PasskeyLoginOperationConfig, PasskeyLoginOperationFull, type PasskeyLoginPostResponseStart, type PasskeyLoginStartable, type PasskeyLoginSubmitted, type PasskeyOperationEnrollmentExplicitSpecType, type PasskeyOperationLoginExplicitSpecType, type PasswordEnrollmentConfig, PasswordEnrollmentOperationFull, type PasswordEnrollmentTypedError, type PasswordLoginCUICeremonyStart, type PasswordLoginCUIGetOptionsFinished, type PasswordLoginCUIGetOptionsStart, type PasswordLoginCUISpecType, type PasswordLoginCUITypedError, type PasswordLoginConfig, type PasswordLoginExplicitSpecType, PasswordLoginOperationFull, type PasswordLoginTypedError, type PasswordManagerExtension, type PasswordManagerExtensionName, type PredefinedEvent, type ProbeContext, type ProbeEntry, type ProbeInput, type ProvideDataOperationConfig, ProvideDataOperationFull, type ProvideDataOperationPostResponseStart, type ProvideDataOperationSpecType, type ProvideDataOperationStart, type ProvideIdentifierError, type ProvideIdentifierFinish, type ProvideIdentifierPostResponseStart, type ProvideIdentifierSpecType, type ProvideIdentifierStart, type QueueOptions, RAW_ERROR_BOUNDS, type RawErrorEnvelope, RequestQueue, SDK_NAME, SDK_VERSION, type SdkInfo, type SdkReliabilityConfig, type SdkReliabilityConfigOverrides, type SdkRetryConfig, type SerializeRawErrorOptions, SessionStorage, type SetFlowTagsOptions, type SmsOTPOperationConfig, type SmsOTPOperationPostResponseStart, type SmsOTPOperationSpecType, SmsOtpOperationFull, type SocialLoginEntry, type SocialLoginExchangeCodeFinished, type SocialLoginExchangeCodeStart, type SocialLoginGetRedirectUrlFinished, type SocialLoginGetRedirectUrlStart, type SocialLoginOperationConfig, SocialLoginOperationFull, type SocialLoginProviderType, type SocialLoginSpecType, type SourcePathQueryMode, type SsoLoginExchangeCodeFinished, type SsoLoginExchangeCodeStart, type SsoLoginGetRedirectUrlFinished, type SsoLoginGetRedirectUrlStart, type SsoLoginOperationConfig, SsoLoginOperationFull, type SsoLoginSpecType, type StandaloneDeviceInfoSource, type StepHelper, type StepIdentifier, type StepOptions, type StorageEngine, type SubflowTrigger, type SubflowType, type TelemetryEntry, type TelemetryLevel, type TelemetrySink, type TotpOperationConfig, TotpOperationFull, type TotpOperationPostResponseStart, type TotpOperationSpecType, type TrackerOptions, type Transport, type TransportMakeRequestResponse, type TransportOptions, type TrustedDeviceBindingMetadata, type TrustedDeviceCheckConfig, TrustedDeviceCheckOperationFull, type TrustedDeviceCheckResult, type TrustedDeviceCheckStepResult, type TrustedDeviceCheckTypedError, TrustedDeviceEnrollmentOperationFull, type TrustedDeviceEnrollmentResult, type TrustedDeviceOperationConfig, type TrustedDevicePurpose, type TrustedDeviceStorage, UNLOAD_BUDGET_BYTES, UNLOAD_PROBE_MAX_BYTES, type UserReference, type WebAuthnIdentifierProjector, type WebAuthnIdentifierProjectors, cacheConfig, clearExperiment, clearExperiments, createLogger, destroy, detectPasswordManagerExtensions, getExperiments, getSessionId, getTracker, init, loadCachedConfig, logError, logInfo, namespacedKey, parseReliabilityConfig, resetSession, resolveRawErrorLimits, resolveReliabilityConfig, sanitizeAssertionResponse, sanitizeCreationOptions, sanitizeCreationResponse, sanitizeRequestOptions, serializeRawError, setExperiment, setExperiments, setFlowTags, setUser, telemetry, utf8Length };
package/dist/index.d.ts CHANGED
@@ -1418,6 +1418,12 @@ declare class OperationFullProvideIdentifierWithCUI extends OperationFull {
1418
1418
  }
1419
1419
 
1420
1420
  type SocialLoginSpecType = "pre-identifier" | "post-identifier";
1421
+ /**
1422
+ * How the attempt began. `button`: the user clicked a provider button and the provider ran in a full-page redirect.
1423
+ * `popup`: the user clicked a provider button and the provider ran in a popup window. `one-tap`: the provider showed
1424
+ * its own prompt (e.g. Google One Tap, a FedCM prompt) and the credential came back in page.
1425
+ */
1426
+ type SocialLoginEntry = "button" | "one-tap" | "popup";
1421
1427
  type SocialLoginGetRedirectUrlStart = {
1422
1428
  provider?: SocialLoginProviderType;
1423
1429
  explicitSpecType?: SocialLoginSpecType;
@@ -1425,11 +1431,15 @@ type SocialLoginGetRedirectUrlStart = {
1425
1431
  type SocialLoginGetRedirectUrlFinished = {};
1426
1432
  type SocialLoginExchangeCodeStart = {
1427
1433
  provider?: SocialLoginProviderType;
1434
+ /** Same as the operation config's `entry`, for callers that report only this step. */
1435
+ entry?: SocialLoginEntry;
1428
1436
  };
1429
1437
  type SocialLoginExchangeCodeFinished = {};
1430
1438
  type SocialLoginOperationConfig = {
1431
1439
  /** The classifier drops the attempt if no spec type arrives on any of its events — supply it here or on a step's start data as soon as known. */
1432
1440
  explicitSpecType?: SocialLoginSpecType;
1441
+ /** How the attempt began; omit for a button click with a full-page redirect. */
1442
+ entry?: SocialLoginEntry;
1433
1443
  };
1434
1444
  declare class SocialLoginOperationFull extends OperationFull {
1435
1445
  readonly getRedirectUrl: StepHelper<SocialLoginGetRedirectUrlStart, SocialLoginGetRedirectUrlFinished>;
@@ -2284,6 +2294,32 @@ declare class CorbadoTracker {
2284
2294
  * ```
2285
2295
  */
2286
2296
  formOperationFull(config: FormOperationConfig): FormOperationFull;
2297
+ /**
2298
+ * Track a social login with an external provider (e.g. Google, Apple).
2299
+ *
2300
+ * @param config - Optional spec type and entry.
2301
+ * @remarks
2302
+ * Set `entry` to how the attempt began: omit it for a provider button with a full-page redirect,
2303
+ * `"popup"` when the provider ran in a popup window, `"one-tap"` when the provider showed its own
2304
+ * prompt (e.g. Google One Tap). A One Tap has no redirect: report only `exchangeCode`, never
2305
+ * `getRedirectUrl`.
2306
+ * @example
2307
+ * ```ts
2308
+ * // Provider button:
2309
+ * const social = tracker.socialLoginOperationFull({ explicitSpecType: "pre-identifier" });
2310
+ * social.getRedirectUrl.start({ provider: "google" });
2311
+ * social.getRedirectUrl.finished({});
2312
+ * // Back from the provider, on the new page load:
2313
+ * const back = tracker.socialLoginOperationFull({ explicitSpecType: "pre-identifier" });
2314
+ * back.exchangeCode.start({ provider: "google" });
2315
+ * back.exchangeCode.finished({});
2316
+ *
2317
+ * // Google One Tap, when the credential arrives in page:
2318
+ * const oneTap = tracker.socialLoginOperationFull({ explicitSpecType: "pre-identifier", entry: "one-tap" });
2319
+ * oneTap.exchangeCode.start({ provider: "google" });
2320
+ * oneTap.exchangeCode.finished({});
2321
+ * ```
2322
+ */
2287
2323
  socialLoginOperationFull(config?: SocialLoginOperationConfig): SocialLoginOperationFull;
2288
2324
  /**
2289
2325
  * Track enterprise SSO (SAML/OIDC) through the organization's identity provider.
@@ -2938,7 +2974,7 @@ declare class EventStore<T = Event> {
2938
2974
  type WebAuthnIdentifierProjector = (value: string) => string | null | undefined;
2939
2975
  /**
2940
2976
  * Optional user identifier projection shared by native WebAuthn capture and network serializers.
2941
- * A missing callback preserves user identifiers. Callbacks should be deterministic across payloads.
2977
+ * A missing callback omits user identifiers. Callbacks should be deterministic across payloads.
2942
2978
  * Credential IDs and encoded attestation/authenticator data are retained unchanged.
2943
2979
  */
2944
2980
  type WebAuthnIdentifierProjectors = {
@@ -2947,10 +2983,10 @@ type WebAuthnIdentifierProjectors = {
2947
2983
  };
2948
2984
  /**
2949
2985
  * Serializes WebAuthn creation options, removing `user.name` and `user.displayName`.
2950
- * Binary values become base64url strings. User IDs are retained unless a projector is supplied.
2986
+ * Binary values become base64url strings. `user.id` is omitted unless a projector is supplied.
2951
2987
  *
2952
2988
  * @param value - Native publicKey options, a JSON object, or JSON text; not an application envelope.
2953
- * @param projectors - Optional synchronous user identifier projection; default identity.
2989
+ * @param projectors - Optional synchronous user identifier projection; default omits user identifiers.
2954
2990
  * @returns JSON text, or undefined for malformed or unserializable input.
2955
2991
  * @remarks Does not mutate input, read blacklisted getters, or call toJSON. No tracker initialization is required.
2956
2992
  * @example
@@ -2962,10 +2998,10 @@ type WebAuthnIdentifierProjectors = {
2962
2998
  declare function sanitizeCreationOptions(value: unknown, projectors?: WebAuthnIdentifierProjectors): string | undefined;
2963
2999
  /**
2964
3000
  * Serializes a registration credential, removing `clientExtensionResults.prf.results`.
2965
- * By default other fields remain, including attestation material and credential IDs. Binary values become base64url strings.
3001
+ * `response.userHandle` is omitted unless a projector is supplied. By default other fields remain, including attestation material and credential IDs. Binary values become base64url strings.
2966
3002
  *
2967
3003
  * @param value - A native registration credential, JSON object, or JSON text; not an application envelope.
2968
- * @param projectors - Optional synchronous user identifier projection; default identity.
3004
+ * @param projectors - Optional synchronous user identifier projection; default omits user identifiers.
2969
3005
  * @returns JSON text, or undefined for malformed or unserializable input.
2970
3006
  * @remarks Does not mutate input, read blacklisted getters, or call toJSON. Encoded attestation and client-data blobs are not decoded or redacted.
2971
3007
  */
@@ -2981,10 +3017,11 @@ declare function sanitizeCreationResponse(value: unknown, projectors?: WebAuthnI
2981
3017
  declare function sanitizeRequestOptions(value: unknown): string | undefined;
2982
3018
  /**
2983
3019
  * Serializes an authentication credential, removing `response.signature` and `clientExtensionResults.prf.results`.
2984
- * By default other fields remain, including credential IDs and user handles. Binary values become base64url strings.
3020
+ * `response.userHandle` is omitted unless a projector is supplied. Other fields remain, including credential IDs.
3021
+ * Binary values become base64url strings.
2985
3022
  *
2986
3023
  * @param value - A native authentication credential, JSON object, or JSON text; not an application envelope.
2987
- * @param projectors - Optional synchronous user identifier projection; default identity.
3024
+ * @param projectors - Optional synchronous user identifier projection; default omits user identifiers.
2988
3025
  * @returns JSON text, or undefined for malformed or unserializable input.
2989
3026
  * @remarks Does not mutate input, read blacklisted getters, or call toJSON. This is a path blacklist, not general-purpose secret detection; encoded client-data blobs are not decoded or redacted.
2990
3027
  */
@@ -3025,4 +3062,4 @@ declare function logInfo(message: string): void;
3025
3062
  declare function logError(message: string): void;
3026
3063
  declare function destroy(): Promise<void>;
3027
3064
 
3028
- export { type AppConfirmationOperationCeremonyTypedError, type AppConfirmationOperationConfig, AppConfirmationOperationFull, type AppConfirmationOperationRetryReason, type AppConfirmationOperationSpecType, type AppConfirmationOperationStart, type AuthDecisionFinished, type AuthDecisionStarted, AuthEventName, type AuthMethodDecisionFinished, type AuthMethodDecisionStarted, type AuthMethodType, type BaseEvent, CEREMONY_LOW_EVENT_TAIL_MS, CONFIG_BOUNDS, CONFIG_REQUEST_HEADER, CONFIG_STORAGE_KEY, type CaptchaOperationConfig, CaptchaOperationFull, type CaptchaOperationSpecType, type ClientCapabilities, type ClientEnvHandleMeta, type ClientEnvHandleMetaSource, type Conversion, CookieStorage, CorbadoTracker, type CreateLoggerOptions, type CustomEvent, DEFAULT_DEVICE_INFO_COLLECTOR_TIMEOUT_MS, DEFAULT_FLUSH_INTERVAL_MS, DEFAULT_MAX_ENTRIES, DEFAULT_MAX_SERIALIZED_LENGTH, DEFAULT_RELIABILITY_CONFIG, DEFAULT_SEQ_LOCK_TIMEOUT_MS, DEFAULT_SESSION_INACTIVITY_MS, type DeviceInfo, type DeviceInfoCollectionError, type DeviceInfoDataWeb, type DeviceType, type EmailLinkContinuationConfig, EmailLinkContinuationOperation, type EmailLinkOperationConfig, EmailLinkOperationFull, type EmailLinkOperationPostResponseStart, type EmailLinkOperationSendStart, type EmailLinkOperationSpecType, type EmailOTPOperationConfig, type EmailOTPOperationPostResponseStart, type EmailOTPOperationSendOTPStart, type EmailOTPOperationSpecType, EmailOtpOperationFull, type ErrorStepOptions, type Event, type EventBatch, type EventBatchMeta, type EventMeta, EventStore, type EventType, type FlowAutoFinished, type FlowDecided, type FlowFinished, type FlowHandle, type FlowReset, type FlowStarted, type FlowType, type FlushReason, type FormOperationConfig, FormOperationFull, type JavaScriptHighEntropy, type KeyOperationConfig, KeyRegistrationOperationFull, KeySigningOperationFull, LocalStorage, type Logger, type LowEvent, type LowEventFieldRole, type LowEventInitiator, type LowEventInputEffect, type LowEventSourceKind, type MultiFlowReset, type MultiFlowStarted, NamespacedStorage, type NormalizedError, OUTBOX_LOCK_NAME, OUTBOX_STORAGE_KEY, type ObserveSdkConfigSnapshot, OperationFull, OperationFullProvideIdentifierWithCUI, type OperationFullProvideIdentifierWithCUIConfig, type OutboxEntry, PROBE_BATCH_MAX_BYTES, PROBE_BATCH_MAX_ITEMS, PROBE_PAYLOAD_MAX_BYTES, PROBE_QUEUE_MAX_BYTES, PROBE_QUEUE_MAX_ITEMS, type PasskeyDeletionDeletionTypedError, type PasskeyDeletionOperationConfig, PasskeyDeletionOperationFull, type PasskeyDeletionUserConfirmationTypedError, type PasskeyEnrollmentCeremonyFinished, type PasskeyEnrollmentCeremonyStart, type PasskeyEnrollmentGetOptionsFinished, type PasskeyEnrollmentGetOptionsStart, type PasskeyEnrollmentOperationConfig, PasskeyEnrollmentOperationFull, type PasskeyEnrollmentPostResponseStart, type PasskeyLoginCUIGetOptionsFinished, type PasskeyLoginCUIGetOptionsStart, type PasskeyLoginCUISpecType, type PasskeyLoginCeremonyFinished, type PasskeyLoginCeremonyStart, type PasskeyLoginClientError, type PasskeyLoginFinish, type PasskeyLoginGetOptionsFinished, type PasskeyLoginGetOptionsStart, type PasskeyLoginOperationConfig, PasskeyLoginOperationFull, type PasskeyLoginPostResponseStart, type PasskeyLoginStartable, type PasskeyLoginSubmitted, type PasskeyOperationEnrollmentExplicitSpecType, type PasskeyOperationLoginExplicitSpecType, type PasswordEnrollmentConfig, PasswordEnrollmentOperationFull, type PasswordEnrollmentTypedError, type PasswordLoginCUICeremonyStart, type PasswordLoginCUIGetOptionsFinished, type PasswordLoginCUIGetOptionsStart, type PasswordLoginCUISpecType, type PasswordLoginCUITypedError, type PasswordLoginConfig, type PasswordLoginExplicitSpecType, PasswordLoginOperationFull, type PasswordLoginTypedError, type PasswordManagerExtension, type PasswordManagerExtensionName, type PredefinedEvent, type ProbeContext, type ProbeEntry, type ProbeInput, type ProvideDataOperationConfig, ProvideDataOperationFull, type ProvideDataOperationPostResponseStart, type ProvideDataOperationSpecType, type ProvideDataOperationStart, type ProvideIdentifierError, type ProvideIdentifierFinish, type ProvideIdentifierPostResponseStart, type ProvideIdentifierSpecType, type ProvideIdentifierStart, type QueueOptions, RAW_ERROR_BOUNDS, type RawErrorEnvelope, RequestQueue, SDK_NAME, SDK_VERSION, type SdkInfo, type SdkReliabilityConfig, type SdkReliabilityConfigOverrides, type SdkRetryConfig, type SerializeRawErrorOptions, SessionStorage, type SetFlowTagsOptions, type SmsOTPOperationConfig, type SmsOTPOperationPostResponseStart, type SmsOTPOperationSpecType, SmsOtpOperationFull, type SocialLoginExchangeCodeFinished, type SocialLoginExchangeCodeStart, type SocialLoginGetRedirectUrlFinished, type SocialLoginGetRedirectUrlStart, type SocialLoginOperationConfig, SocialLoginOperationFull, type SocialLoginProviderType, type SocialLoginSpecType, type SourcePathQueryMode, type SsoLoginExchangeCodeFinished, type SsoLoginExchangeCodeStart, type SsoLoginGetRedirectUrlFinished, type SsoLoginGetRedirectUrlStart, type SsoLoginOperationConfig, SsoLoginOperationFull, type SsoLoginSpecType, type StandaloneDeviceInfoSource, type StepHelper, type StepIdentifier, type StepOptions, type StorageEngine, type SubflowTrigger, type SubflowType, type TelemetryEntry, type TelemetryLevel, type TelemetrySink, type TotpOperationConfig, TotpOperationFull, type TotpOperationPostResponseStart, type TotpOperationSpecType, type TrackerOptions, type Transport, type TransportMakeRequestResponse, type TransportOptions, type TrustedDeviceBindingMetadata, type TrustedDeviceCheckConfig, TrustedDeviceCheckOperationFull, type TrustedDeviceCheckResult, type TrustedDeviceCheckStepResult, type TrustedDeviceCheckTypedError, TrustedDeviceEnrollmentOperationFull, type TrustedDeviceEnrollmentResult, type TrustedDeviceOperationConfig, type TrustedDevicePurpose, type TrustedDeviceStorage, UNLOAD_BUDGET_BYTES, UNLOAD_PROBE_MAX_BYTES, type UserReference, type WebAuthnIdentifierProjector, type WebAuthnIdentifierProjectors, cacheConfig, clearExperiment, clearExperiments, createLogger, destroy, detectPasswordManagerExtensions, getExperiments, getSessionId, getTracker, init, loadCachedConfig, logError, logInfo, namespacedKey, parseReliabilityConfig, resetSession, resolveRawErrorLimits, resolveReliabilityConfig, sanitizeAssertionResponse, sanitizeCreationOptions, sanitizeCreationResponse, sanitizeRequestOptions, serializeRawError, setExperiment, setExperiments, setFlowTags, setUser, telemetry, utf8Length };
3065
+ export { type AppConfirmationOperationCeremonyTypedError, type AppConfirmationOperationConfig, AppConfirmationOperationFull, type AppConfirmationOperationRetryReason, type AppConfirmationOperationSpecType, type AppConfirmationOperationStart, type AuthDecisionFinished, type AuthDecisionStarted, AuthEventName, type AuthMethodDecisionFinished, type AuthMethodDecisionStarted, type AuthMethodType, type BaseEvent, CEREMONY_LOW_EVENT_TAIL_MS, CONFIG_BOUNDS, CONFIG_REQUEST_HEADER, CONFIG_STORAGE_KEY, type CaptchaOperationConfig, CaptchaOperationFull, type CaptchaOperationSpecType, type ClientCapabilities, type ClientEnvHandleMeta, type ClientEnvHandleMetaSource, type Conversion, CookieStorage, CorbadoTracker, type CreateLoggerOptions, type CustomEvent, DEFAULT_DEVICE_INFO_COLLECTOR_TIMEOUT_MS, DEFAULT_FLUSH_INTERVAL_MS, DEFAULT_MAX_ENTRIES, DEFAULT_MAX_SERIALIZED_LENGTH, DEFAULT_RELIABILITY_CONFIG, DEFAULT_SEQ_LOCK_TIMEOUT_MS, DEFAULT_SESSION_INACTIVITY_MS, type DeviceInfo, type DeviceInfoCollectionError, type DeviceInfoDataWeb, type DeviceType, type EmailLinkContinuationConfig, EmailLinkContinuationOperation, type EmailLinkOperationConfig, EmailLinkOperationFull, type EmailLinkOperationPostResponseStart, type EmailLinkOperationSendStart, type EmailLinkOperationSpecType, type EmailOTPOperationConfig, type EmailOTPOperationPostResponseStart, type EmailOTPOperationSendOTPStart, type EmailOTPOperationSpecType, EmailOtpOperationFull, type ErrorStepOptions, type Event, type EventBatch, type EventBatchMeta, type EventMeta, EventStore, type EventType, type FlowAutoFinished, type FlowDecided, type FlowFinished, type FlowHandle, type FlowReset, type FlowStarted, type FlowType, type FlushReason, type FormOperationConfig, FormOperationFull, type JavaScriptHighEntropy, type KeyOperationConfig, KeyRegistrationOperationFull, KeySigningOperationFull, LocalStorage, type Logger, type LowEvent, type LowEventFieldRole, type LowEventInitiator, type LowEventInputEffect, type LowEventSourceKind, type MultiFlowReset, type MultiFlowStarted, NamespacedStorage, type NormalizedError, OUTBOX_LOCK_NAME, OUTBOX_STORAGE_KEY, type ObserveSdkConfigSnapshot, OperationFull, OperationFullProvideIdentifierWithCUI, type OperationFullProvideIdentifierWithCUIConfig, type OutboxEntry, PROBE_BATCH_MAX_BYTES, PROBE_BATCH_MAX_ITEMS, PROBE_PAYLOAD_MAX_BYTES, PROBE_QUEUE_MAX_BYTES, PROBE_QUEUE_MAX_ITEMS, type PasskeyDeletionDeletionTypedError, type PasskeyDeletionOperationConfig, PasskeyDeletionOperationFull, type PasskeyDeletionUserConfirmationTypedError, type PasskeyEnrollmentCeremonyFinished, type PasskeyEnrollmentCeremonyStart, type PasskeyEnrollmentGetOptionsFinished, type PasskeyEnrollmentGetOptionsStart, type PasskeyEnrollmentOperationConfig, PasskeyEnrollmentOperationFull, type PasskeyEnrollmentPostResponseStart, type PasskeyLoginCUIGetOptionsFinished, type PasskeyLoginCUIGetOptionsStart, type PasskeyLoginCUISpecType, type PasskeyLoginCeremonyFinished, type PasskeyLoginCeremonyStart, type PasskeyLoginClientError, type PasskeyLoginFinish, type PasskeyLoginGetOptionsFinished, type PasskeyLoginGetOptionsStart, type PasskeyLoginOperationConfig, PasskeyLoginOperationFull, type PasskeyLoginPostResponseStart, type PasskeyLoginStartable, type PasskeyLoginSubmitted, type PasskeyOperationEnrollmentExplicitSpecType, type PasskeyOperationLoginExplicitSpecType, type PasswordEnrollmentConfig, PasswordEnrollmentOperationFull, type PasswordEnrollmentTypedError, type PasswordLoginCUICeremonyStart, type PasswordLoginCUIGetOptionsFinished, type PasswordLoginCUIGetOptionsStart, type PasswordLoginCUISpecType, type PasswordLoginCUITypedError, type PasswordLoginConfig, type PasswordLoginExplicitSpecType, PasswordLoginOperationFull, type PasswordLoginTypedError, type PasswordManagerExtension, type PasswordManagerExtensionName, type PredefinedEvent, type ProbeContext, type ProbeEntry, type ProbeInput, type ProvideDataOperationConfig, ProvideDataOperationFull, type ProvideDataOperationPostResponseStart, type ProvideDataOperationSpecType, type ProvideDataOperationStart, type ProvideIdentifierError, type ProvideIdentifierFinish, type ProvideIdentifierPostResponseStart, type ProvideIdentifierSpecType, type ProvideIdentifierStart, type QueueOptions, RAW_ERROR_BOUNDS, type RawErrorEnvelope, RequestQueue, SDK_NAME, SDK_VERSION, type SdkInfo, type SdkReliabilityConfig, type SdkReliabilityConfigOverrides, type SdkRetryConfig, type SerializeRawErrorOptions, SessionStorage, type SetFlowTagsOptions, type SmsOTPOperationConfig, type SmsOTPOperationPostResponseStart, type SmsOTPOperationSpecType, SmsOtpOperationFull, type SocialLoginEntry, type SocialLoginExchangeCodeFinished, type SocialLoginExchangeCodeStart, type SocialLoginGetRedirectUrlFinished, type SocialLoginGetRedirectUrlStart, type SocialLoginOperationConfig, SocialLoginOperationFull, type SocialLoginProviderType, type SocialLoginSpecType, type SourcePathQueryMode, type SsoLoginExchangeCodeFinished, type SsoLoginExchangeCodeStart, type SsoLoginGetRedirectUrlFinished, type SsoLoginGetRedirectUrlStart, type SsoLoginOperationConfig, SsoLoginOperationFull, type SsoLoginSpecType, type StandaloneDeviceInfoSource, type StepHelper, type StepIdentifier, type StepOptions, type StorageEngine, type SubflowTrigger, type SubflowType, type TelemetryEntry, type TelemetryLevel, type TelemetrySink, type TotpOperationConfig, TotpOperationFull, type TotpOperationPostResponseStart, type TotpOperationSpecType, type TrackerOptions, type Transport, type TransportMakeRequestResponse, type TransportOptions, type TrustedDeviceBindingMetadata, type TrustedDeviceCheckConfig, TrustedDeviceCheckOperationFull, type TrustedDeviceCheckResult, type TrustedDeviceCheckStepResult, type TrustedDeviceCheckTypedError, TrustedDeviceEnrollmentOperationFull, type TrustedDeviceEnrollmentResult, type TrustedDeviceOperationConfig, type TrustedDevicePurpose, type TrustedDeviceStorage, UNLOAD_BUDGET_BYTES, UNLOAD_PROBE_MAX_BYTES, type UserReference, type WebAuthnIdentifierProjector, type WebAuthnIdentifierProjectors, cacheConfig, clearExperiment, clearExperiments, createLogger, destroy, detectPasswordManagerExtensions, getExperiments, getSessionId, getTracker, init, loadCachedConfig, logError, logInfo, namespacedKey, parseReliabilityConfig, resetSession, resolveRawErrorLimits, resolveReliabilityConfig, sanitizeAssertionResponse, sanitizeCreationOptions, sanitizeCreationResponse, sanitizeRequestOptions, serializeRawError, setExperiment, setExperiments, setFlowTags, setUser, telemetry, utf8Length };