Event Listener

Flinks Connect triggers events according to authentication responses or different UI steps that are presented to the end-user.

These events can be listened by using JavaScript event listeners and can be useful tools for tracing purposes as well as controlling the user experience.

To have the Event Listener enabled in your page, you need to make sure that you have the following script in your page:

<!-- Event Listener -->
<script>
    window.addEventListener('message', function(e) {
        console.log(e.data);
    });
</script>

Types of events and their meanings

EventMeaning
APP_MOUNTEDFlinks Connect has retrieved configuration values from the API, and has successfully loaded
APP_ONLINEThe internet connection was restored
APP_OFFLINEThe internet connection was lost
ACCOUNT_SELECTEDThe user selects an account
COMPONENT_ACCEPT_CONSENTThe user accepts to give consent
COMPONENT_ACCEPT_TERMSThe user has checked the box to approve the terms and conditions linked in the URL termsUrl={https://example.com}.
COMPONENT_CLICK_RESET_PASSWORDThe user clicks on the Reset Password button.
COMPONENT_CLICK_TERMS_URLThe user clicks on the terms and conditions link.
COMPONENT_CLOSE_SESSIONThe use clicks on the _X in the top right corner. Related to the Layout Customization parameters : closeEnable.
COMPONENT_DENY_CONSENTThe user denies consent
COMPONENT_DENY_TERMSThe user unchecked the box on the left of the terms and conditions using the parameter termsUrl={https://example.com}.
COMPONENT_HELP2FA_INFOWhen Flinks Connect loads the Help2FA component, or if the users goes back from the troubleshooting screen via the back button.
COMPONENT_HELP2FA_TROUBLESHOOTINGWhen Flinks Connect navigates to the troubleshooting screen due to the user clicking the troubleshooting tips link on the info screen.
COMPONENT_LOAD_ACCOUNT_SELECTIONWhen Flinks Connect loads the account selection page. Contains metadata regarding the user's accounts (totalAccounts & displayedAccounts)
COMPONENT_LOAD_CONSENTThe consent page is loaded using the parameter consentEnable=true
COMPONENT_LOAD_CREDENTIALThe user is faced with a prompt for FI username and password.
COMPONENT_LOAD_CREDENTIAL_RETRYThe user clicks on retry after an authorize error
COMPONENT_LOAD_INSTITUTION_SELECTORThe FI list page is loaded
COMPONENT_LOAD_MFAThe MFA page is loaded. Contains metadata that indicates what MFA challenges the user received (mfaTypes)
COMPONENT_LOAD_MFA_RETRYThe user clicks on retry after a failed MFA challenge error.
COMPONENT_PROVIDER_CONSENT_ABOUTWhen the user visits the about screen by clicking the 'tell me more...' link on the info screen.
COMPONENT_PROVIDER_CONSENT_INFOWhen Flinks Connects loads the US OAuth consent component (or the user goes back to it from one of the following screens)
COMPONENT_PROVIDER_CONSENT_LEGALWhen the user visits the legal screen by clicking the 'privacy policy' link on the info screen.
DISABLED_INSTITUTIONAn Institution is disabled.
ENHANCED_MFA_HAS_QUESTIONSWhen there is unanswered question using enhancedMFA=true
ENHANCED_MFA_NO_QUESTIONSWhen there is no unanswered question using enhancedMFA=true
ENHANCED_MFA_SUCCESSSuccessfully completed the enhancedMFA flow using enhancedMFA=true
INSTITUTION_SELECTEDThe user selected his desired Financial Institution.
INVALID_INSTITUTIONAn institution is not valid.
INSTITUTION_NOT_AVAILABLEAn institution is not available.
INVALID_SECURITY_RESPONSEThe MFA challenge failed.
MAXIMUM_RETRY_REACHEDThe maximum amount of retries is reached using the parameter maximumRetry={number}. It is set in the URL as a parameter.
QUESTION_NOT_FOUNDThe MFA challenge is returned by the API. Contains metadata that indicates what MFA challenges the user received (mfaTypes)
REDIRECTWhen the user successfully completed the connection. This steps includes the URL, the loginId, requestId and institution. Here is a sample :
step: 'REDIRECT', url: '<https://toolbox-iframe.private.fin.ag/v2/Result/…-4e36-795b-08db4111f24d&institution=FlinksCapital'>, loginId: 'b92b2bbd-31f8-4e36-795b-08db4111f24d', requestId: 'de4d15c4-5738-4004-81b2-fb28c5e4c1a0', institution: 'FlinksCapital'
RETRY_COUNTThe authorization failed and the retry count is incremented. Staring at 0.
SESSION_NONEXISTENT or SESSION_EXPIREDWhen the session expired.
SESSION_STORAGE_BLOCKEDLegacy cookie management (deprecated)
SESSION_STORAGE_BLOCKED_RETRYLegacy cookie management (deprecated)
SKIP_ENHANCED_MFAThe user skips the unanswered MFA question using skipEnhancedMFA=true
SUBMIT_ANSWER_MFA_QUESTIONSThe user submits the unanswered MFA questions
SUBMIT_CREDENTIALThe form is valid and the user clicks on continue.
SUBMIT_GET_MFA_QUESTIONSWhen Flinks Connect gets unanswered MFA questions using enhancedMFA=true
SUBMIT_MFAThe user submits the MFA
BACK_SECTIONThe user clicks on the back arrow enabled by the backEnable parameter

What’s Next

Knowing how to handle the Events is essential for controlling your user experience. If you think you have it all covered, you can jump right on the steps to get your integration ready!