Define a new abstract class IdentifierVerificationRecord, extending the root VerificationRecord abstract class. This class defines an extra identifyUser method. All the verification records used to identify a user are considered an IdentifierVerificationRecord. An identifyUser method must be implemented properly.
Defines the interaction profile type and guard.
Implement the toUserProfile methods in the VerificationCode, SocialVerification, and SsoVerirification classes. This method will be used to convert the verified verification record to a new user profile, for new user registration and profile fulfillment use.
Implement a ProfileValidator class. This library class will be used to guard and validate new users and newly added profile fields. Including guardProfileUniquenessAcrossUsers and upcoming guardUserExistingProfiles.
Update the createNewUser method in the ExperienceInteraction. Implement the new user creation flow. Retrieve the new user identifier profile from the given verification record, and create a new user in DB.
Testing
The integration test will be placed into a separate PR to avoid a large PR size.
Summary
This PR includes the following updates:
Define a new abstract class
IdentifierVerificationRecord
, extending the rootVerificationRecord
abstract class. This class defines an extraidentifyUser
method. All the verification records used to identify a user are considered anIdentifierVerificationRecord
. AnidentifyUser
method must be implemented properly.Defines the interaction profile type and guard.
Implement the
toUserProfile
methods in theVerificationCode
,SocialVerification
, andSsoVerirification
classes. This method will be used to convert the verified verification record to a new user profile, for new user registration and profile fulfillment use.Implement a
ProfileValidator
class. This library class will be used to guard and validate new users and newly added profile fields. IncludingguardProfileUniquenessAcrossUsers
and upcomingguardUserExistingProfiles
.Update the
createNewUser
method in theExperienceInteraction
. Implement the new user creation flow. Retrieve the new user identifier profile from the given verification record, and create a new user in DB.Testing
The integration test will be placed into a separate PR to avoid a large PR size.
Checklist
.changeset