AllyConnect is a JavaScript class designed to facilitate seamless integration of the AllyConnect widget into web applications. Follow the steps below to integrate and utilize AllyConnect in your project:
You can install AllyConnect via npm:
npm i @ally.wtf/connect
-
Import AllyConnect: Import the AllyConnect class into your JavaScript file.
let AllyConnect = require("@ally.wtf/connect");
-
Instantiate AllyConnect: Create a new instance of AllyConnect by providing your unique
appId
.const ally = new AllyConnect('your_app_id');
-
Open the Widget: Call the
openWidget()
method to launch the Ally Connect widget.ally.openWidget();
-
Handling Events: You can handle events emitted by the AllyConnect widget using the on() method. Supported events include
ready
,select_bank
,connecting
,connected
&auth_expired
.ally.on('connecting', (data) => { // Handle close event }); ally.on('connected', (data) => { // Handle close event }); ally.on('auth_expired', (data) => { // Handle close event });
const AllyConnect = require('@ally.wtf/connect');
// Instantiate AllyConnect
const ally = new AllyConnect('your_app_id');
// Open the Widget
ally.openWidget();
// Handle close event
ally.on('close', (data) => {
console.log('Widget closed', data);
});
For more examples check here
If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on GitHub.
This project is licensed under the MIT License - see the LICENSE.md file for details.
For any inquiries or assistance, contact [email protected].