investec-auth-library
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Investec Auth Library

A simple login type component which assists with the Authentication flow for the Investec Programmable Banking API.

Example

You will need to have your Investec API keys at hand. Specifically, your client ID, client secret and API key. You can learn more about getting your Investec API keys in the Quick Start Quide.

🔑 Getting Started

Installing

npm install investec-auth-library

Example

import { Auth } from 'investec-auth-library';

<Auth
  url='page-to-redirect-to'
  buttonColor='blue'
  buttonText='Login'
  buttonTextColor='white'
/>

Note: The form uses Tailwindcss for styling, so you will need to include Tailwindcss in your project.

Proxy Server

The auth component form makes a POST request to the Investec Auth Endpoint which is done via a proxy. See the below example of using a proxy with Vite which can be added to your vite.config.js or vite.config.ts file.

server: {
  proxy: {
    '/api': {
      target: 'https://openapi.investec.com/identity',
      rewrite: path => path.replace('/api', ''),
      changeOrigin: true,
      secure: false,
      ws: true,
    }
  }
}

🧑‍💻 Contributions

Pull requests and changes are welcome.

📄 License

This project is MIT licensed.

Readme

Keywords

none

Package Sidebar

Install

npm i investec-auth-library

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

228 kB

Total Files

10

Last publish

Collaborators

  • make-community