@opencampus/ocid-connect-js 2.0.6 → 2.0.8

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 CHANGED
@@ -44,6 +44,9 @@ Setup Context to hook up state variables and override configuration
44
44
  ```js
45
45
  import { OCConnect } from '@opencampus/ocid-connect-js';
46
46
 
47
+ // Optional: only required when using wallet service
48
+ // import '@opencampus/ocid-connect-js/sdk/airkit';
49
+
47
50
  const opts = {
48
51
  clientId: '<Does_Not_Matter_For_Sandbox_mode>',
49
52
  redirectUri: 'http://localhost:3001/redirect',
@@ -76,6 +79,21 @@ opts Properties
76
79
  | storageType | Storage type to store the auth state. Use cookie if specified as `cookie`. Otherwise if not defined, local storage is used. |
77
80
  | domain | Domain to store cookie. Only meaningful if `cookie` type storaged is used. Leave it blank to tell the browser to use the current domain. |
78
81
  | sameSite | Specify the SameSite behavior when using cookie as storage. When `true` - SameSite: strict; when `false` - SameSite: None, when not set - default SameSite behavior browser dependent |
82
+ | useWalletService | Enable wallet service integration. If set to `true`, you must also import `@opencampus/ocid-connect-js/sdk/airkit` once during app startup. |
83
+
84
+ ### Wallet Service (AirKit) opt-in
85
+
86
+ The default imports are unchanged. Keep using:
87
+
88
+ ```js
89
+ import { OCConnect } from '@opencampus/ocid-connect-js';
90
+ ```
91
+
92
+ If and only if you enable `useWalletService: true`, add this one-time side-effect import in your app entry (before creating `OCConnect` / `OCAuth*` instances):
93
+
94
+ ```js
95
+ import '@opencampus/ocid-connect-js/sdk/airkit';
96
+ ```
79
97
 
80
98
  Setup LoginCallBack to handle flow's result
81
99