@os1-platform/console-ui-react 0.6.0 → 0.7.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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/readme.md +5 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@os1-platform/console-ui-react",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "React wrapper for console-ui library",
5
5
  "main": "dist/commonjs/aaa/index.js",
6
6
  "types": "dist/commonjs/types/aaa/index.d.ts",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@fullhuman/postcss-purgecss": "^5.0.0",
30
- "@os1-platform/console-ui-js": "^0.6.0",
30
+ "@os1-platform/console-ui-js": "^0.7.0",
31
31
  "@react-native-community/eslint-config": "^2.0.0",
32
32
  "@types/react": "^17.0.37",
33
33
  "axios": "^0.21.4",
package/readme.md CHANGED
@@ -200,12 +200,13 @@
200
200
 
201
201
  15. If nothing is selected then, when user clicks on app for the first time, it asks how we want to redirect the app.
202
202
 
203
- 16. To get Access Token, use `getAuthenticationTokens` method, for userInfo, use `getUser`, and check whether user is authenticated use `isAuthenticated()`. User have to use context of consoleUi and call authInitializer method of it.
203
+ 16. To get Access Token, use `getAuthenticationTokens` method, for userInfo, use `getUser`, and check whether user is authenticated use `isAuthenticated()`. User have to use context of consoleUi and call authInitializer method of it. `getTenantConfigurations` method, to get all the organization based tenant data.
204
204
  ```Javascript
205
205
  if (consoleInstance) {
206
- const accessToken = consoleInstance.authInitializer.getAuthenticationTokens();
207
- const userInfo = consoleInstance.authInitializer.getUser();
208
- const isUserAuthenticated = consoleInstance.authInitializer.isAuthenticated();
206
+ const accessToken = await consoleInstance.authInitializer.getAuthenticationTokens();
207
+ const userInfo = await consoleInstance.authInitializer.getUser();
208
+ const isUserAuthenticated = await consoleInstance.authInitializer.isAuthenticated();
209
+ const tenantInfo = await consoleInstance.authInitializer.getTenantConfigurations();
209
210
  }
210
211
  ```
211
212