@basiq/connect-auth 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,64 +1,60 @@
1
- # Basiq Connect Component
1
+ # BASIQ CONNECT COMPONENT
2
2
 
3
3
  The Basiq Connect Auth is a ReactJS UI component exposed to partners who prefer to implement the auth flow as an external component with an SMS OTP built in. When rendered, it will take the user through an SMS OTP flow and then proceed to redirect them to the [Basiq Consent UI](https://api.basiq.io/docs/consent-ui) flow to connect their accounts.
4
4
 
5
- **Note**: This has been offered as an interim solution for partners who require access to v3 of the API before we have released the upgrades to `https://connect.basiq.io/`. If you have any questions regarding this, please reach out to support@basiq.io.
5
+ Note: This has been offered as interim solution for partners who require access to v3 of the API before we have released the upgrades to `https://connect.basiq.io/`. If you have any questions regarding this please reach out to support@basiq.io.
6
6
 
7
7
  ## Setup
8
8
 
9
9
  1. Install `@basiq/connect-auth` and import the component
10
10
 
11
- ```bash
12
- $ npm install @basiq/connect-auth
13
- ```
11
+ ```
12
+ $ npm install @basiq/basiq-connect-control
13
+ ```
14
14
 
15
- ```js
16
- import { BasiqConnect } from "@basiq/connect-auth";
17
- ```
15
+ ```js
16
+ import { BasiqConnect } from "@basiq/connect-auth";
17
+ ```
18
18
 
19
19
  2. Generate a new Auth Link, and retrieve the auth link ID from the public URL that is returned.
20
20
 
21
- ```js
22
- try {
23
- const { data } = await axios.get(
24
- `https://au-api.basiq.io/users/{userId}/auth_link`,
25
- {
26
- method: 'post',
27
- headers: {
28
- Authorization: `Bearer ${YOUR_SERVER_ACCESS_TOKEN}`,
29
- Accept: 'application/json',
30
- 'Content-Type': 'application/json',
31
- },
32
- }
33
- );
21
+ ```js
22
+
23
+ try {
24
+ const { data } = await axios.get(
25
+ `https://au-api.basiq.io/users/{userId}/auth_link`,
26
+ {
27
+ method: 'post',
28
+ headers: {
29
+ Authorization: `Bearer ${YOUR_SERVER_ACCESS_TOKEN}`,
30
+ Accept: 'application/json',
31
+ 'Content-Type': 'application/json',
32
+ },
33
+ }
34
+ );
34
35
 
35
- let auth_id = data.links.public.replace('https://connect.basiq.io/','');
36
+ let auth_id = data.links.public.replace('https://connect.basiq.io/','');
36
37
 
37
- return auth_id;
38
+ return auth_id;
38
39
 
39
- } catch (error) {
40
- console.log(error)
41
- }
42
- ```
40
+ } catch (error) {
41
+ console.log(error)
42
+ }
43
43
 
44
- 3. Drop the component in your code on the page you wish to call it. The component will retrieve the `auth_id` from the URL, so failing to include it there will result in an error. **Note** that the component is full page and will eventually handle the redirect to the Basiq Consent UI, so it should be rendered on its own page (or conditionally, after appending an `auth_link` ID).
44
+ ```
45
45
 
46
- ```jsx
47
- // Component rendered at /auth-link/:auth_id
46
+ 3. Drop the component in your code on the page you wish to call it. The component will retrieve the auth_id from the URL so failing to include it there will result in an error. **Note** that the component is full page and will eventually handle the redirect to the Basiq Consent UI, so it should be rendered on it's own page (or conditionally, after appending an auth_link ID)
48
47
 
49
- export default function Auth() {
50
- return (
51
- <main>
52
- <BasiqConnect />
53
- </main>
54
- );
55
- }
56
- ```
57
48
 
58
- ## Updates
49
+ ```jsx
59
50
 
60
- **OTP Code Length Increased**: The OTP code length has been increased from 4 to 6 characters to enhance security.
51
+ // Component rendered at /auth-link/:auth_id
61
52
 
62
- ## Demo
63
-
64
- You can see a demo of the Basiq Connect Auth component [here](https://demo.arcade.software/DhU1AMDeKC4f6PxNmJcP?embed).
53
+ export default function Auth() {
54
+ return (
55
+ <main>
56
+ <BasiqConnect />
57
+ </main>
58
+ );
59
+ }
60
+ ```
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+
3
+ interface IBCProps {
4
+ test?: boolean;
5
+ }
6
+ declare function BasiqConnect(props: IBCProps): React.JSX.Element;
7
+
8
+ export { BasiqConnect };
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+
3
+ interface IBCProps {
4
+ test?: boolean;
5
+ }
6
+ declare function BasiqConnect(props: IBCProps): React.JSX.Element;
7
+
8
+ export { BasiqConnect };