<!-- Element for the widget to be injected -->
<div id="authcore-register-container"></div>
// Instantiate Register widget
new AuthCoreWidgets.Login({
container: 'authcore-register-container', // Id of the HTML element for the widget
root: 'https://authcore.example.com/widgets', // Authcore is hosted on the sub-domain of example.com,
initialScreen: 'register', // Set initial screen to register
logo: 'default', // Default to show Authcore logo
successRedirectUrl: 'https://application.example.com',
analyticsHook: (type, data) => {
// type is a string describing the event. It is contained in the event list. All Authcore events are typed with prefix `Authcore_`.
// data is a object which is the associated data of an event. By default, if no data is associated, it will be a empty object `{}`.