Skip to content

Commit ba44b61

Browse files
feat(passport): Add subscribed option for marketing consent status (#2757)
1 parent a19e3b4 commit ba44b61

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

packages/auth/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ export type PKCEData = {
110110
export enum MarketingConsentStatus {
111111
OptedIn = 'opted_in',
112112
Unsubscribed = 'unsubscribed',
113+
Subscribed = 'subscribed',
113114
}
114115

115116
export type DirectLoginOptions = {

packages/passport/sdk/src/Passport.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ export class Passport {
283283
* @param {boolean} [options.useRedirectFlow] - If true, uses redirect flow instead of popup flow
284284
* @param {DirectLoginOptions} [options.directLoginOptions] - If provided, contains login method and marketing consent options
285285
* @param {string} [options.directLoginOptions.directLoginMethod] - The login method to use (e.g., 'google', 'apple', 'email')
286-
* @param {MarketingConsentStatus} [options.directLoginOptions.marketingConsentStatus] - Marketing consent status ('opted_in' or 'unsubscribed')
286+
* @param {MarketingConsentStatus} [options.directLoginOptions.marketingConsentStatus] - Marketing consent status ('opted_in' | 'unsubscribed' | 'subscribed')
287287
* @param {string} [options.directLoginOptions.email] - Required when directLoginMethod is 'email'
288288
* @returns {Promise<UserProfile | null>} A promise that resolves to the user profile if logged in, null otherwise
289289
* @throws {Error} If retrieving the cached user session fails (except for "Unknown or invalid refresh token" errors)

packages/passport/sdk/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ export type LoginArguments = {
139139
export enum MarketingConsentStatus {
140140
OptedIn = 'opted_in',
141141
Unsubscribed = 'unsubscribed',
142+
Subscribed = 'subscribed',
142143
}
143144

144145
export type DirectLoginOptions = {

0 commit comments

Comments
 (0)