Login
This script can be called anywhere as you already have the SDK script in your header section.
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');
},
});
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.
Last updated