@stytch/nextjs 17.0.0 → 18.0.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/CHANGELOG.md +14 -0
- package/dist/b2b/index.esm.js +4 -3
- package/dist/b2b/index.headless.d.ts +1 -1
- package/dist/b2b/index.headless.esm.d.ts +1 -1
- package/dist/b2b/index.headless.esm.js +2 -4825
- package/dist/b2b/index.headless.js +2 -4825
- package/dist/b2b/index.js +4 -3
- package/dist/b2b/index.ui.d.ts +1 -1
- package/dist/index.headless.d.ts +1 -2
- package/dist/index.headless.esm.d.ts +1 -2
- package/dist/index.ui.d.ts +1 -2
- package/dist/index.ui.esm.d.ts +1 -2
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @stytch/nextjs
|
|
2
2
|
|
|
3
|
+
## 18.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [f604dcb]
|
|
8
|
+
- @stytch/vanilla-js@4.7.0
|
|
9
|
+
|
|
10
|
+
## 17.0.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 50de202: Fix B2B headless entrypoint to import `@stytch/vanilla-js` rather than bundle it
|
|
15
|
+
- @stytch/vanilla-js@4.4.3
|
|
16
|
+
|
|
3
17
|
## 17.0.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/dist/b2b/index.esm.js
CHANGED
|
@@ -142,7 +142,7 @@ const useStytchIsAuthorized = (resourceId, action) => {
|
|
|
142
142
|
fromCache: true,
|
|
143
143
|
isAuthorized: client.rbac.isAuthorizedSync(resourceId, action),
|
|
144
144
|
});
|
|
145
|
-
}, []);
|
|
145
|
+
}, [action, client, resourceId, setIsAuthorized]);
|
|
146
146
|
useEffect(() => {
|
|
147
147
|
if (isStytchSSRProxy(client)) {
|
|
148
148
|
return;
|
|
@@ -150,7 +150,7 @@ const useStytchIsAuthorized = (resourceId, action) => {
|
|
|
150
150
|
client.rbac.isAuthorized(resourceId, action).then((isAuthorized) => {
|
|
151
151
|
setIsAuthorized({ isAuthorized, fromCache: false, isInitialized: true });
|
|
152
152
|
});
|
|
153
|
-
}, [client, session === null || session === void 0 ? void 0 : session.roles, resourceId, action]);
|
|
153
|
+
}, [client, session === null || session === void 0 ? void 0 : session.roles, resourceId, action, setIsAuthorized]);
|
|
154
154
|
return isAuthorized;
|
|
155
155
|
};
|
|
156
156
|
/**
|
|
@@ -233,7 +233,7 @@ const withStytchPermissions = (Component) => {
|
|
|
233
233
|
client.rbac
|
|
234
234
|
.allPermissions()
|
|
235
235
|
.then((permissions) => setPermissions({ loaded: true, value: permissions }));
|
|
236
|
-
}, [client, session === null || session === void 0 ? void 0 : session.roles]);
|
|
236
|
+
}, [client, session === null || session === void 0 ? void 0 : session.roles, setPermissions]);
|
|
237
237
|
if (!permissions.loaded) {
|
|
238
238
|
return null;
|
|
239
239
|
}
|
|
@@ -360,6 +360,7 @@ const StytchB2B = ({ styles, callbacks, config }) => {
|
|
|
360
360
|
elementId: `#${containerEl.current.id}`,
|
|
361
361
|
styles,
|
|
362
362
|
});
|
|
363
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps -- SDK-1354
|
|
363
364
|
}, [stytchClient, styles, callbacks]);
|
|
364
365
|
return React.createElement("div", { ref: containerEl });
|
|
365
366
|
};
|
|
@@ -12,5 +12,5 @@ import { StytchB2BHeadlessClient } from "@stytch/vanilla-js/b2b/headless";
|
|
|
12
12
|
* )
|
|
13
13
|
* @returns A {@link StytchB2BHeadlessClient}
|
|
14
14
|
*/
|
|
15
|
-
declare const createStytchB2BHeadlessClient: (_PUBLIC_TOKEN: string, options?: import("core/dist/public").StytchClientOptions | undefined) => StytchB2BHeadlessClient;
|
|
15
|
+
declare const createStytchB2BHeadlessClient: (_PUBLIC_TOKEN: string, options?: import("@stytch/core/dist/public").StytchClientOptions | undefined) => StytchB2BHeadlessClient;
|
|
16
16
|
export { createStytchB2BHeadlessClient };
|
|
@@ -12,5 +12,5 @@ import { StytchB2BHeadlessClient } from "@stytch/vanilla-js/b2b/headless";
|
|
|
12
12
|
* )
|
|
13
13
|
* @returns A {@link StytchB2BHeadlessClient}
|
|
14
14
|
*/
|
|
15
|
-
declare const createStytchB2BHeadlessClient: (_PUBLIC_TOKEN: string, options?: import("core/dist/public").StytchClientOptions | undefined) => StytchB2BHeadlessClient;
|
|
15
|
+
declare const createStytchB2BHeadlessClient: (_PUBLIC_TOKEN: string, options?: import("@stytch/core/dist/public").StytchClientOptions | undefined) => StytchB2BHeadlessClient;
|
|
16
16
|
export { createStytchB2BHeadlessClient };
|