Login
This MFE allows the user to log in to his own account. It supports multiple languages and markets. Required attributes for this MFE are "forgot-password-link", "registration-link". This MFE is used in the "my account pages" host component.
Login MFE
This MFE allows the user to log in to his own account. It supports multiple languages and markets. Required attributes for this MFE are "forgot-password-link", "manage-my-bookings-link", "registration-link". This MFE is used in the "my account pages" host component.
Links
Resource | Link |
---|---|
SIT Env | https://sit.tuiflyprjuat.be/en/my-account |
MFE Link | https://mwa-nonprod.tui.com/customer/mwa/login-mfe-test/index.html |
Manifest | https://mwa-nonprod.tui.com/customer/mwa/login-mfe-test/openmfe/manifest.yml |
Docs | https://mwa-nonprod.tui.com/customer/mwa/login-mfe-test/openmfe/documentation.html |
Third party integration
Gigya SDK Login
This method uses for logging in users. Gigya SSO login.
Documentation:
https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a/683844d3c4b54104b2201efffdf558e3.html
Parameters:
Param | Description |
---|---|
loginID | User email |
password | User password |
captchaToken | Google reCAPTCHA token that generated by grecaptcha |
ignoreInterruptions | Always true |
sessionExpiration | 0 or 1 Depends on "Keep me signed in" checkbox |
Gigya SDK Resend Verification Code
If users were not verified their accounts (email verification) after login users can see a message about it and automatically resend the verification email using Resend Verification Code method.
Documentation:
https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a/4138f19d70b21014bbc5a10ce4041860.html
Parameters:
Param | Description |
---|---|
regToken | Receives after calling login method if user's account wasn't verified |
User email |
Usage
Add the following script tag to your web page to load the microfrontend. Note: This is required only once per webpage, even when you embed multiple instances of the microfrontend.
<script src="https://mwa-nonprod.tui.com/customer/mwa/login-mfe-test/main.js" defer></script>
Add the following HTML code anywhere in your webpage at the position where you want the microfrontend to show. You can create multiple instances of the microfrontend.
<tui-login
locale="VALUE"
market="VALUE"
forgot-password-link="VALUE"
registration-link="VALUE">
</tui-login>
Examples
Login MFE with UK_TH in English.
<tui-login
data-theme="tui-light"
locale="en"
market="UK_TH"
forgot-password-link="https://www.tui.co.uk/destinations/your-account/login/pw/forgot-password-link"
manage-my-bookings-link="https://www.tui.co.uk/destinations/your-account/manage-my-bookings-link"
registration-link="https://www.tui.co.uk/destinations/your-account/registration-link">
</tui-login>Login MFE with NL in Dutch.
<tui-login
data-theme="tui-light"
locale="nl"
market="NL"
forgot-password-link="https://www.tui.nl/mijntui/wachtwoord-vergeten/"
manage-my-bookings-link="https://www.tui.nl/mijntui/"
registration-link="https://www.tui.nl/mijntui/#registreren">
</tui-login>
Attributes
This microfrontend accepts the following attributes:
Name | Description | Values | Default | Required |
---|---|---|---|---|
data-theme | This is the theme that will be used to attach TUI's styles. | tui , tui-light , firstchoice , musement | no | |
locale | This is the locale that will be used to render the MFE. | nl-NL , nl-BE , fr-FR , fr-MA , sv-SE , nn-NO , nb-NO , da-DK , fi-FI , es-ES , it-IT , pt-PT , pt-BR , de-DE , de-AT , de-CH , pl-PL , en-GB | yes | |
market | This is the market ID where the MFE will be embedded. | UK_TH , UK_FC , UK_FJ , BE , NL , BE_FO , FR_FO , MA_FO , SE , NO , DK , FI , MM , TT , NL_FC , BE_FC | yes | |
forgot-password-link | This is the link to manage the user's bookings | yes | ||
registration-link | This is the link to create an account | yes | ||
manage-my-bookings-link | This is the link to see my bookings as a user | no | ||
ui-version | This attribute will be used to render diferent versions of the interface | standard , streamlined , compact | standard | no |
Events
This microfrontend emits the following events:
Event | Schema |
---|---|
this event is triggered when the MFE is loaded |
|
this event is triggered when the user logs in and when costumer state is refreshed |
|
this event is triggered when the MFE is loaded |
|
this event is triggered when the MFE is loaded |
|
this event is triggered when the MFE is loaded |
|
event to dispatch on login failure |
|
event to dispatch on keep me signed in |
|
event to dispatch on successful login |
|
event to dispatch on resend activation link |
|
event to dispatch on forgotten your password link |
|
event to dispatch on registration page link click |
|
event to dispatch on login click |
|
Event dispatched to open the drawer with the requested MFE and attributes inside |
|