@slashid/jump-page 0.0.26 → 1.0.0
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 +32 -43
- package/package/dist/_astro/app.1ce51383.d.ts +2 -0
- package/package/main.js +12430 -1653
- package/package/main.js.map +1 -1
- package/package/src/components/app/app.component.d.ts +6 -0
- package/package/src/main.d.ts +2 -0
- package/package/style.css +1 -1
- package/package.json +1 -4
- package/astro.config.mjs +0 -30
- package/dist/_astro/app.c9eaaa27.js +0 -96
- package/dist/_astro/client.e76f28bb.js +0 -1
- package/dist/_astro/index.fdea1a5e.js +0 -32
- package/dist/_astro/sdk.4a24bf90.css +0 -1
- package/dist/_astro/sdk.4d0f721e.css +0 -1
- package/dist/favicon.png +0 -0
- package/dist/sdk.html +0 -1
- package/package/dist/_astro/app.c9eaaa27.d.ts +0 -2
package/README.md
CHANGED
|
@@ -1,68 +1,57 @@
|
|
|
1
|
-
# /id - SDK
|
|
1
|
+
# /id - SDK Verification page
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This package implements the SlashID verification page as a React component.
|
|
4
|
+
This allows self hosting the verification page as this component can be rendered in any React application.
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## Installation
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
Use any package manager you prefer:
|
|
8
9
|
|
|
9
10
|
```bash
|
|
10
|
-
npm install
|
|
11
|
+
$ npm install @slashid/jump-page
|
|
11
12
|
```
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
## Usage
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
Usage: sid-jump-cli serve [options]
|
|
17
|
-
|
|
18
|
-
Start the development server
|
|
16
|
+
First import the default styles:
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-a, --api-url <char> SlashID API URL (default: "https://api.slashid.com")
|
|
23
|
-
-s, --sdk-url <char> SlashID SDK URL (default: "https://cdn.slashid.com/sdk.html")
|
|
24
|
-
-h, --help display help for command
|
|
18
|
+
```jsx
|
|
19
|
+
import "@slashid/jump-page/style.css"
|
|
25
20
|
```
|
|
26
21
|
|
|
27
|
-
|
|
22
|
+
Then render the `Verification` component:
|
|
28
23
|
|
|
29
|
-
|
|
24
|
+
```jsx
|
|
25
|
+
import { Verification } from "@slashid/jump-page"
|
|
30
26
|
|
|
31
|
-
|
|
27
|
+
import "@slashid/jump-page/style.css"
|
|
32
28
|
|
|
33
|
-
|
|
29
|
+
export function VerificationPage() {
|
|
30
|
+
return <Verification />
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Configuration
|
|
35
|
+
|
|
36
|
+
By default, the `Verification` component uses the `production` environment. You can switch to the `sandbox` environment by passing the corresponding value as the `environment` prop:
|
|
34
37
|
|
|
35
38
|
```jsx
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
import { Parent, Child } from './components';
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
<Parent client:load>
|
|
42
|
-
<Child client:load />
|
|
43
|
-
</Parent>
|
|
39
|
+
<Verification environment="sandbox" />
|
|
44
40
|
```
|
|
45
41
|
|
|
46
|
-
|
|
42
|
+
A custom environment can be used by specifying the API and SDK URLs:
|
|
47
43
|
|
|
48
|
-
|
|
44
|
+
```ts
|
|
45
|
+
import { Verification, type Environment } from "@slashid/jump-page"
|
|
49
46
|
|
|
50
|
-
|
|
51
|
-
// app.tsx
|
|
52
|
-
import { Parent, Child } from "./components";
|
|
47
|
+
import "@slashid/jump-page/style.css"
|
|
53
48
|
|
|
54
49
|
export function App() {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
<Child client:load />
|
|
58
|
-
</Parent>
|
|
59
|
-
);
|
|
50
|
+
const customEnvironment: Environment = { baseURL: config.baseURL, sdkURL: config.sdkURL }
|
|
51
|
+
return <Verification environment={environment} />
|
|
60
52
|
}
|
|
53
|
+
```
|
|
61
54
|
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
import { App } from './app';
|
|
65
|
-
---
|
|
55
|
+
## Customisation
|
|
66
56
|
|
|
67
|
-
|
|
68
|
-
```
|
|
57
|
+
Verification page can be customised using the SlashID Console.
|