Skip to content

Green Dot Plugins

Green Dot provides a flexible plugin system that allows you to extend the functionality of your application. Plugins can add new features, modify existing behavior, or integrate with external services.

  • Plugins are instanciated in gd.app.config.ts and are proposed on project init to be installed

Example:

myApp/gd.app.config.ts
export const appConfig = {
...
plugins: [
new GDdoubleAuthentication({ enable: true }),
],
...
}

Green Dot comes with several built-in plugins:

  • GDmanagedLogin: Handles user authentication and login management
  • GDdoubleAuthentication: Provides two-factor authentication support
  • GDapiKeyAuthentication: Manages API key-based authentication

Retrieves an instance of a registered plugin by its name. Returns null if the plugin is not registered.

Example:

import { getPlugin, getPluginConfig } from 'green_dot'
const managedLogin = getPlugin('GDmanagedLogin');
managedLogin?.userLogin(...params) // log the user anywhere in your app
const managedLoginConfig = getPluginConfig('GDmanagedLogin')
managedLoginConfig.passwordMaxLength // number

Please get in touch or propose a pull request to create a custom plugin. Documentation available soon.