Skip to content

Commit cc81a8c

Browse files
committed
fix: set default marketing consent status value
1 parent 63a03a4 commit cc81a8c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Packages/Passport/Runtime/Scripts/Private/Model/DirectLoginOptions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class DirectLoginOptions
2020
public string email;
2121

2222
/// <summary>
23-
/// Marketing consent status (optional).
23+
/// Marketing consent status. Defaults to OptedIn. Required by Auth endpoints.
2424
/// </summary>
2525
public MarketingConsentStatus? marketingConsentStatus;
2626

@@ -31,20 +31,20 @@ public DirectLoginOptions()
3131
{
3232
directLoginMethod = DirectLoginMethod.Email;
3333
email = null;
34-
marketingConsentStatus = null;
34+
marketingConsentStatus = MarketingConsentStatus.OptedIn;
3535
}
3636

3737
/// <summary>
3838
/// Constructor with method and email.
3939
/// </summary>
4040
/// <param name="loginMethod">The direct login method</param>
4141
/// <param name="emailAddress">The email address (optional)</param>
42-
/// <param name="marketingConsentStatus">The marketing consent status (optional)</param>
42+
/// <param name="marketingConsentStatus">Marketing consent status. Defaults to OptedIn if not specified. Required.</param>
4343
public DirectLoginOptions(DirectLoginMethod loginMethod, string emailAddress = null, MarketingConsentStatus? marketingConsentStatus = null)
4444
{
4545
directLoginMethod = loginMethod;
4646
email = emailAddress;
47-
this.marketingConsentStatus = marketingConsentStatus;
47+
this.marketingConsentStatus = marketingConsentStatus ?? MarketingConsentStatus.OptedIn;
4848
}
4949

5050
/// <summary>

0 commit comments

Comments
 (0)