Login
This script can be called anywhere as you already have the SDK script in your header section.
Parameters | Description |
---|---|
clientId | |
wrappingElementId | 'wrappingElementId' is a mandatory string that is the id of an element (e.g. a div with absolute positioning on your website) within which you want the login popup to be embedded. |
| |
shell
javaScript
php
const csc = window._csc as any;
csc('conscent-login', {
debug: true,
clientId: clientId,
defaultEmail: defaultEmail || '',
defaultName: defaultName || '',
defaultPhone: defaultPhone || '',
wrappingElementId: 'embed',
successCallback: async (userDetailsObject: any) => {
console.log('Success callback received from conscent login', userDetailsObject);
setUserDetails(userDetailsObject);
props.setShowLoginModal(false)
},
onCrossBtnClickSuccess: async () => {
console.log('cross btn click successfully');
props.setShowLoginModal(false)
},
unauthorizedCallback: () => {
console.log('unauthorized callback called');
},
});
shell
const csc = window._csc as any;
csc('conscent-login', {
debug: true,
clientId: clientId,
defaultEmail: defaultEmail || '',
defaultName: defaultName || '',
defaultPhone: defaultPhone || '',
wrappingElementId: 'embed',
successCallback: async (userDetailsObject: any) => {
console.log('Success callback received from conscent login', userDetailsObject);
setUserDetails(userDetailsObject);
props.setShowLoginModal(false)
},
onCrossBtnClickSuccess: async () => {
console.log('cross btn click successfully');
props.setShowLoginModal(false)
},
unauthorizedCallback: () => {
console.log('unauthorized callback called');
},
});
const csc = window._csc as any;
csc('conscent-login', {
debug: true,
clientId: clientId,
defaultEmail: defaultEmail || '',
defaultName: defaultName || '',
defaultPhone: defaultPhone || '',
wrappingElementId: 'embed',
successCallback: async (userDetailsObject: any) => {
console.log('Success callback received from conscent login', userDetailsObject);
setUserDetails(userDetailsObject);
props.setShowLoginModal(false)
},
onCrossBtnClickSuccess: async () => {
console.log('cross btn click successfully');
props.setShowLoginModal(false)
},
unauthorizedCallback: () => {
console.log('unauthorized callback called');
},
});
After integrating the Login script, the Login popup appears on the screen which can be customizable for all the Clients.


Verify OTP Screen
Last modified 1mo ago