E2EE Integration Guide
Overview of E2EE
End-to-End Encryption (E2EE) adds an extra layer of security to your communications by encrypting the data transmitted between the server and client. The process begins with a key exchange where the client and server share keys for encrypting and decrypting messages. This exchange acts like a handshake and ensures that all subsequent communications are encrypted. Only the intended server and client are able to decrypt the messages.
Steps to Enable E2EE in the SDK
1. Set Up a Custom Server for E2EE
Initialize the Welcome SDK with a custom server for E2EE as follows:
IncodeWelcome.Builder(this, WELCOME_API_URL, WELCOME_API_KEY, E2EE_URL)
.build()
new IncodeWelcome.Builder(this, WELCOME_API_URL, WELCOME_API_KEY, E2EE_URL)
.build();
2. Enable E2EE via SessionConfig:
val sessionConfig: SessionConfig = SessionConfig.Builder()
.setE2eEncryptionEnabled(true)
.build()
SessionConfig sessionConfig = new SessionConfig.Builder()
.setE2eEncryptionEnabled(true)
.build();
3. Pass the SessionConfig Object.
You can pass the SessionConfig
object to IncodeWelcome
when starting a Flow
. There are two methods to do this based on the API you are using:
3.1 For Simple Flows:
IncodeWelcome.getInstance().startOnboarding(
activityContext,
sessionConfig,
flowConfig,
onboardingListener)
IncodeWelcome.getInstance().startOnboarding(
activityContext,
sessionConfig,
flowConfig,
onboardingListener);
3.2 For Advanced Usage:
...
IncodeWelcome.getInstance().startOnboardingSection(
activityContext,
sessionConfig,
flowConfig,
onboardingListener
)
...
IncodeWelcome.getInstance().startOnboardingSection(
activityContext,
sessionConfig,
flowConfig,
onboardingListener);
Updated 6 months ago