This repository is crafted with ❤️ by our talented community members. It's a space for everyone to use, contribute to, and share. While it aligns with the spirit of our community, please note that this repo is not directly endorsed or supported by Investec. Always exercise caution and discretion when using or contributing to community-driven projects.
A simple login type component which assists with the Authentication flow for the Investec Programmable Banking API.
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.
npm install investec-auth-library
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.
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,
}
}
}
Pull requests and changes are welcome.
This project is MIT licensed.