Set user identification information

How to set user identification information using DFINERY SDK. SDK integration must be done first.

Set up

User identification information can be set using DfineryProperties.setIdentityand DfineryProperties.setIdentities methods. User identification information is defined in DFIdentity, and only defined values ​​can be used.

User identification information

Name
Detail

DFIdentity.EXTERNAL_ID

User ID

DFIdentity.EMAIL

User's email

DFIdentity.PHONE_NO

User's phone number

DFIdentity.KAKAO_USER_ID

User's Kakao account ID

DFIdentity.LINE_USER_ID

User's Line account ID

Set by item

func setIdentity(key: String, value: String?)
  • key: User identification information key (using the DFIdentity constant)

  • value: User identification information value

Dfinery.shared().setIdentity(key: DFIdentity.EMAIL, value: "[email protected]")

Set multiple items at once

func set(identities: [String: String])
  • identities: You must enter the type and value of user identification information in the form of Dictionary<String, String>. The value cannot be nil.

Dfinery.shared().set(identities: [            
    DFIdentity.PHONE_NO: "821012345678",
    DFIdentity.EXTERNAL_ID: "external_id"
])

Reset user identification information

For iOS, user identification information remains even after deleting and reinstalling the app.

You can call the resetIdentity() method to remove and initialize any previously stored user identification information.

Dfinery.shared().resetIdentity()

Learn more

If you need more details on user federation, see User Federation Scenarios in Advanced Use Cases.

Last updated