Session Customization
Tailor the FaceSign verification experience to match your brand and user experience requirements. Customize colors, fonts, messaging, and UI behavior to create a seamless integration.
Overview
Session customization allows you to control various aspects of the verification interface to match your application's look and feel. Customizations are applied when creating a session and affect the entire user journey.
Customization Options
Branding
Customize the visual appearance to match your brand:
- Name
primaryColor
- Type
- string
- Description
Main brand color used for buttons and highlights
- Name
secondaryColor
- Type
- string
- Description
Accent color for secondary elements
- Name
logoUrl
- Type
- string
- Description
Your company logo displayed during verification
- Name
backgroundColor
- Type
- string
- Description
Overall background color
- Name
textColor
- Type
- string
- Description
Primary text color
UI Controls
Control which UI elements are shown or hidden:
- Name
showProgressBar
- Type
- boolean
- Description
Display verification progress
- Name
showSkipButton
- Type
- boolean
- Description
Allow users to skip optional steps
- Name
showHelpButton
- Type
- boolean
- Description
Display help/support options
- Name
allowCameraSwitch
- Type
- boolean
- Description
Let users switch between cameras
- Name
showTorchButton
- Type
- boolean
- Description
Display flashlight toggle for document scanning
Messaging
Customize text and instructions shown to users:
- Name
welcomeMessage
- Type
- string
- Description
Initial greeting text
- Name
completionMessage
- Type
- string
- Description
Success message after verification
- Name
errorMessages
- Type
- object
- Description
Custom error text for different scenarios
- Name
instructionText
- Type
- string
- Description
Step-by-step guidance for users
Implementation
Include customization options when creating a session:
const session = await client.sessions.create({
clientReferenceId: 'user-123',
metadata: { userId: '123' },
modules: [
{ type: 'identityVerification' },
{ type: 'documentAuthentication' }
],
customization: {
branding: {
primaryColor: '#007bff',
secondaryColor: '#6c757d',
logoUrl: 'https://your-domain.com/logo.png',
backgroundColor: '#ffffff',
textColor: '#333333'
},
ui: {
showProgressBar: true,
showSkipButton: false,
showHelpButton: true,
allowCameraSwitch: true,
showTorchButton: true
},
messaging: {
welcomeMessage: 'Welcome to our secure verification process',
completionMessage: 'Verification completed successfully!',
errorMessages: {
cameraPermission: 'Please allow camera access to continue',
networkError: 'Connection error. Please check your internet.'
}
}
}
})
Advanced Customization
Custom CSS
For advanced styling, you can inject custom CSS:
Custom CSS
customization: {
css: `
.facesign-container {
font-family: 'Your Custom Font', sans-serif;
border-radius: 12px;
}
.facesign-button {
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
`
}
Responsive Design
Customize appearance for different screen sizes:
Responsive Design
customization: {
responsive: {
mobile: {
fontSize: '14px',
padding: '16px'
},
desktop: {
fontSize: '16px',
padding: '24px'
}
}
}
Best Practices
- Test customizations on different devices and browsers
- Ensure sufficient color contrast for accessibility
- Keep custom messages clear and actionable
- Use high-quality logos and images
- Consider your brand guidelines when choosing colors
- Test with users to ensure the customized experience is intuitive
Examples
Minimal Branding
Minimal Setup
customization: {
branding: {
primaryColor: '#2563eb',
logoUrl: 'https://example.com/logo.svg'
}
}
Full Customization
Complete Setup
customization: {
branding: {
primaryColor: '#059669',
secondaryColor: '#d1fae5',
logoUrl: 'https://example.com/logo.svg',
backgroundColor: '#f9fafb',
textColor: '#111827'
},
ui: {
showProgressBar: true,
showHelpButton: true,
allowCameraSwitch: true
},
messaging: {
welcomeMessage: 'Let\'s verify your identity securely',
completionMessage: 'All set! Your identity has been verified.'
}
}
Custom CSS and extensive UI modifications may affect the verification user experience. Test thoroughly to ensure all functionality remains accessible and intuitive.