@supertokens-plugins/rownd-nodejs 0.2.1 → 0.3.0-beta.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 +20 -0
- package/dist/bulkMigrate.js +1096 -0
- package/dist/cli.js +54 -0
- package/dist/generateAppConfig.js +731 -0
- package/dist/index.d.mts +716 -26
- package/dist/index.d.ts +716 -26
- package/dist/index.js +1756 -113
- package/dist/index.mjs +1747 -110
- package/dist/initConfig.js +136 -0
- package/dist/setupCoreInstance.js +295 -0
- package/package.json +13 -10
- package/scripts/bulkMigrate.ts +0 -450
- package/scripts/config.yaml +0 -27
- package/src/constants.ts +0 -5
- package/src/errors.ts +0 -13
- package/src/index.ts +0 -7
- package/src/logger.ts +0 -7
- package/src/plugin.test.ts +0 -790
- package/src/plugin.ts +0 -189
- package/src/pluginImplementation.ts +0 -187
- package/src/telemetry/axiomTelemetryClient.ts +0 -34
- package/src/telemetry/createTelemetryClient.ts +0 -87
- package/src/telemetry/openTelemetryClient.ts +0 -32
- package/src/types.ts +0 -124
package/README.md
CHANGED
|
@@ -44,6 +44,26 @@ SuperTokens.init({
|
|
|
44
44
|
});
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
+
### Session Claim Fields
|
|
48
|
+
|
|
49
|
+
Schema fields can be copied into the SuperTokens access-token payload by setting `include_in_session_claims: true`. Use `session_claim_name` when the claim name should differ from the Rownd data field name.
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
RowndMigrationPlugin.init({
|
|
53
|
+
rowndAppKey: process.env.ROWND_APP_KEY,
|
|
54
|
+
rowndAppSecret: process.env.ROWND_APP_SECRET,
|
|
55
|
+
schema: {
|
|
56
|
+
employee_id: {
|
|
57
|
+
display_name: "Employee ID",
|
|
58
|
+
type: "string",
|
|
59
|
+
user_visible: false,
|
|
60
|
+
include_in_session_claims: true,
|
|
61
|
+
session_claim_name: "employee_id_claim",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
```
|
|
66
|
+
|
|
47
67
|
## API Endpoint
|
|
48
68
|
|
|
49
69
|
The plugin exposes a single endpoint:
|