central-auth-js-sdk 1.0.10 → 1.0.11
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/INTEGRATION_GUIDE.md +13 -13
- package/package.json +1 -1
package/INTEGRATION_GUIDE.md
CHANGED
|
@@ -7,22 +7,22 @@ This guide explains how to **pull the SDK** and use **all SDK functionalities**
|
|
|
7
7
|
## 1. Pull / install the SDK
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install central-auth-sdk
|
|
10
|
+
npm install central-auth-js-sdk
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Use in your app (with a bundler such as Vite, Webpack, or Parcel):
|
|
14
14
|
|
|
15
15
|
```javascript
|
|
16
|
-
import { initializeAuth, startSignup, startLogin } from 'central-auth-sdk';
|
|
17
|
-
import 'central-auth-sdk/styles.css';
|
|
16
|
+
import { initializeAuth, startSignup, startLogin } from 'central-auth-js-sdk';
|
|
17
|
+
import 'central-auth-js-sdk/styles.css';
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
Or in HTML (if your tool resolves node_modules):
|
|
21
21
|
|
|
22
22
|
```html
|
|
23
|
-
<link rel="stylesheet" href="./node_modules/central-auth-sdk/styles.css" />
|
|
23
|
+
<link rel="stylesheet" href="./node_modules/central-auth-js-sdk/styles.css" />
|
|
24
24
|
<script type="module">
|
|
25
|
-
import { startSignup, startLogin } from 'central-auth-sdk';
|
|
25
|
+
import { startSignup, startLogin } from 'central-auth-js-sdk';
|
|
26
26
|
// ...
|
|
27
27
|
</script>
|
|
28
28
|
```
|
|
@@ -41,9 +41,9 @@ You need:
|
|
|
41
41
|
|
|
42
42
|
```html
|
|
43
43
|
<div id="auth-container"></div>
|
|
44
|
-
<link rel="stylesheet" href="central-auth-sdk/styles.css" />
|
|
44
|
+
<link rel="stylesheet" href="central-auth-js-sdk/styles.css" />
|
|
45
45
|
<script type="module">
|
|
46
|
-
import { startSignup } from 'central-auth-sdk';
|
|
46
|
+
import { startSignup } from 'central-auth-js-sdk';
|
|
47
47
|
|
|
48
48
|
const instance = startSignup({
|
|
49
49
|
container: '#auth-container',
|
|
@@ -57,9 +57,9 @@ You need:
|
|
|
57
57
|
|
|
58
58
|
```html
|
|
59
59
|
<div id="auth-container"></div>
|
|
60
|
-
<link rel="stylesheet" href="central-auth-sdk/styles.css" />
|
|
60
|
+
<link rel="stylesheet" href="central-auth-js-sdk/styles.css" />
|
|
61
61
|
<script type="module">
|
|
62
|
-
import { startLogin } from 'central-auth-sdk';
|
|
62
|
+
import { startLogin } from 'central-auth-js-sdk';
|
|
63
63
|
|
|
64
64
|
const instance = startLogin({
|
|
65
65
|
container: '#auth-container',
|
|
@@ -109,7 +109,7 @@ Call once (e.g. at app load) to set defaults. Returns `{ startSignup, startLogin
|
|
|
109
109
|
**Example:**
|
|
110
110
|
|
|
111
111
|
```javascript
|
|
112
|
-
import { initializeAuth } from 'central-auth-sdk';
|
|
112
|
+
import { initializeAuth } from 'central-auth-js-sdk';
|
|
113
113
|
|
|
114
114
|
const auth = initializeAuth({
|
|
115
115
|
env: 'dev', // uses https://central-auth-dev.soham.ai/apis
|
|
@@ -223,7 +223,7 @@ startSignup({
|
|
|
223
223
|
**Built-in presets** are available via `THEME_PRESETS`:
|
|
224
224
|
|
|
225
225
|
```javascript
|
|
226
|
-
import { startSignup, THEME_PRESETS } from 'central-auth-sdk';
|
|
226
|
+
import { startSignup, THEME_PRESETS } from 'central-auth-js-sdk';
|
|
227
227
|
|
|
228
228
|
startSignup({
|
|
229
229
|
container: '#auth',
|
|
@@ -387,8 +387,8 @@ onContinue() {
|
|
|
387
387
|
## 10. Full integration example
|
|
388
388
|
|
|
389
389
|
```javascript
|
|
390
|
-
import { initializeAuth, startSignup, startLogin } from 'central-auth-sdk';
|
|
391
|
-
import 'central-auth-sdk/styles.css';
|
|
390
|
+
import { initializeAuth, startSignup, startLogin } from 'central-auth-js-sdk';
|
|
391
|
+
import 'central-auth-js-sdk/styles.css';
|
|
392
392
|
|
|
393
393
|
const auth = initializeAuth({
|
|
394
394
|
env: 'dev',
|