-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
443 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
node_modules | ||
dist | ||
.DS_Store | ||
coverage | ||
coverage | ||
.jest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
dist | ||
dist | ||
.jest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -554,19 +554,19 @@ _Note: Ensure you have already run `npm install` before_ | |
|
||
## KindeSDK methods | ||
|
||
| Property | Description | Arguments | Usage | Sample output | | ||
| -------------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| login | Constructs redirect url and sends user to Kinde to sign in | {<br>org_code?: string<br>} | kinde.login(); or<br>kinde.login({org_code: 'your organization code'}) // Allow `org_code` to be provided if a specific org is to be signed up into. | | | ||
| register | Constructs redirect url and sends user to Kinde to sign up | {<br>org_code?: string<br>} | kinde.register(); or<br>kinde.register({org_code: 'your organization code'}) // Allow `org_code` to be provided if a specific org is to be registered into. | | | ||
| logout | Logs the user out of Kinde | | kinde.logout(); | | | ||
| getToken | Returns the raw Access token from URL after logged from Kinde | url: string | kinde.getToken(url); | {<br>"access_token": "eyJhbGciOiJSUzI...",<br>"expires_in": 86400,<br>"id_token": "eyJhbGciOiJSU...",<br>"refresh_token": "yXI1bFQKbXKLD7AIU...",<br>"scope": "openid profile email offline",<br>"token_type": "bearer"<br>} | | ||
| Property | Description | Arguments | Usage | Sample output | | ||
| -------------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| login | Constructs redirect url and sends user to Kinde to sign in | {<br>org_code?: string<br>} | kinde.login(); or<br>kinde.login({org_code: 'your organization code'}) // Allow `org_code` to be provided if a specific org is to be signed up into. | | | ||
| register | Constructs redirect url and sends user to Kinde to sign up | {<br>org_code?: string<br>} | kinde.register(); or<br>kinde.register({org_code: 'your organization code'}) // Allow `org_code` to be provided if a specific org is to be registered into. | | | ||
| logout | Logs the user out of Kinde | | kinde.logout(); | | | ||
| getToken | Returns the raw Access token from URL after logged from Kinde | url: string | kinde.getToken(url); | {<br>"access_token": "eyJhbGciOiJSUzI...",<br>"expires_in": 86400,<br>"id_token": "eyJhbGciOiJSU...",<br>"refresh_token": "yXI1bFQKbXKLD7AIU...",<br>"scope": "openid profile email offline",<br>"token_type": "bearer"<br>} | | ||
| createOrg | Constructs redirect url and sends user to Kinde to sign up and create a new org for your business | {<br>org_name?: string<br>} | kinde.createOrg(); or<br>kinde.createOrg({org_name: 'your organization name'}); // Allow `org_name` to be provided if you want a specific organization name when you create | | | ||
| getClaim | Gets a claim from an access or id token | claim: string;<br>tokenKey?: string | kinde.getClaim('given_name', 'id_token'); | "David" | | ||
| getPermission | Returns the state of a given permission | key: string | kinde.getPermission('read:todos'); | {"orgCode":"org_1234","isGranted":true} | | ||
| getPermissions | Returns all permissions for the current user for the organization they are logged into | | kinde.getPermissions(); | {"orgCode":"org_1234","permissions":["create:todos","update:todos","read:todos"]} | | ||
| getOrganization | Get details for the organization your user is logged into | | kinde.getOrganization(); | {"orgCode": "org_1234"} | | ||
| getUserDetails | Returns the profile for the current user | | kinde.getUserDetails(); | {"given_name":"Dave","id":"abcdef","family_name":"Smith","email":"[email protected]"} | | ||
| getUserOrganizations | Gets an array of all organizations the user has access to | | kinde.getUserOrganizations(); | {"orgCodes":["org1234","org5678"]} | | ||
| getClaim | Gets a claim from an access or id token | claim: string;<br>tokenKey?: string | kinde.getClaim('given_name', 'id_token'); | "David" | | ||
| getPermission | Returns the state of a given permission | key: string | kinde.getPermission('read:todos'); | {"orgCode":"org_1234","isGranted":true} | | ||
| getPermissions | Returns all permissions for the current user for the organization they are logged into | | kinde.getPermissions(); | {"orgCode":"org_1234","permissions":["create:todos","update:todos","read:todos"]} | | ||
| getOrganization | Get details for the organization your user is logged into | | kinde.getOrganization(); | {"orgCode": "org_1234"} | | ||
| getUserDetails | Returns the profile for the current user | | kinde.getUserDetails(); | {"given_name":"Dave","id":"abcdef","family_name":"Smith","email":"[email protected]"} | | ||
| getUserOrganizations | Gets an array of all organizations the user has access to | | kinde.getUserOrganizations(); | {"orgCodes":["org1234","org5678"]} | | ||
|
||
## General tips | ||
|
||
|
Oops, something went wrong.