@frontegg/nextjs 6.7.11-alpha.4036867038 → 6.7.11
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 +2 -1
- package/client/FronteggAppRouter.d.ts +3 -3
- package/client/index.js +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
## [6.7.11](https://github.com/frontegg/frontegg-nextjs/compare/v6.7.10...v6.7.11) (2023-1-
|
|
3
|
+
## [6.7.11](https://github.com/frontegg/frontegg-nextjs/compare/v6.7.10...v6.7.11) (2023-1-30)
|
|
4
4
|
|
|
5
5
|
- FR-10549 - fix error login with sms
|
|
6
6
|
- FR-10437 - select color
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
- FR-9816 - fix version
|
|
29
29
|
|
|
30
30
|
### NextJS Wrapper 6.7.11:
|
|
31
|
+
- FR-10584 - Set searchParam as optional in FronteggAppRouter
|
|
31
32
|
- FR-10557 - Improve FronteggMiddleware request handler
|
|
32
33
|
- update frontegg manually
|
|
33
34
|
- FR-10379 - disable refresh token by default for ssr
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { ParsedUrlQuery } from 'querystring';
|
|
3
|
-
|
|
3
|
+
interface FronteggRouterProps {
|
|
4
4
|
params: ParsedUrlQuery & {
|
|
5
5
|
'frontegg-router'?: string[];
|
|
6
6
|
};
|
|
7
|
-
searchParams
|
|
8
|
-
}
|
|
7
|
+
searchParams?: ParsedUrlQuery;
|
|
8
|
+
}
|
|
9
9
|
export declare function FronteggAppRouter({ params: { 'frontegg-router': pathArr }, searchParams }: FronteggRouterProps): string;
|
|
10
10
|
export {};
|
package/client/index.js
CHANGED
|
@@ -23,7 +23,7 @@ function FronteggAppRouter(_a) {
|
|
|
23
23
|
var loginWithRedirect = useLoginWithRedirect();
|
|
24
24
|
var logout = useLoginActions().logout;
|
|
25
25
|
var pathname = "/".concat(pathArr.join('/'));
|
|
26
|
-
if (!pathname || pathname.startsWith('/_next/data')) {
|
|
26
|
+
if (searchParams && (!pathname || pathname.startsWith('/_next/data'))) {
|
|
27
27
|
var query = searchParams[Object.keys(searchParams)[0]];
|
|
28
28
|
pathname = "/".concat(Array.isArray(query) ? query.join('/') : query);
|
|
29
29
|
}
|
|
@@ -42,8 +42,8 @@ function FronteggAppRouter(_a) {
|
|
|
42
42
|
}
|
|
43
43
|
if (app.options.hostedLoginBox) {
|
|
44
44
|
if (pathname === routesObj.loginUrl) {
|
|
45
|
-
if (searchParams.redirectUrl) {
|
|
46
|
-
localStorage.setItem('FRONTEGG_AFTER_AUTH_REDIRECT_URL', "".concat(window.location.origin).concat(searchParams.redirectUrl));
|
|
45
|
+
if (searchParams === null || searchParams === void 0 ? void 0 : searchParams.redirectUrl) {
|
|
46
|
+
localStorage.setItem('FRONTEGG_AFTER_AUTH_REDIRECT_URL', "".concat(window.location.origin).concat(searchParams === null || searchParams === void 0 ? void 0 : searchParams.redirectUrl));
|
|
47
47
|
}
|
|
48
48
|
loginWithRedirect();
|
|
49
49
|
}
|