@frontegg/redux-store 5.74.0 → 5.76.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/auth/LoginState/index.d.ts +2 -2
- package/auth/index.d.ts +1 -1
- package/auth/index.js +3 -11
- package/auth/reducer.d.ts +1 -1
- package/node/auth/index.js +1 -1
- package/node/{index-d8f1a357.js → index-c0fe2f70.js} +3 -11
- package/node/index.js +1 -1
- package/node/toolkit/index.js +1 -1
- package/package.json +1 -1
|
@@ -80,7 +80,7 @@ declare const reducers: {
|
|
|
80
80
|
declare const actions: {
|
|
81
81
|
requestAuthorize: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[(boolean | undefined)?], boolean, string, never, never>;
|
|
82
82
|
requestAuthorizeSSR: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[string], string, string, never, never>;
|
|
83
|
-
requestHostedLoginAuthorize: import("@reduxjs/toolkit").
|
|
83
|
+
requestHostedLoginAuthorize: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[(Record<string, string> | undefined)?], Record<string, string> | undefined, string, never, never>;
|
|
84
84
|
handleHostedLoginCallback: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[HostedLoginCallback], HostedLoginCallback, string, never, never>;
|
|
85
85
|
afterAuthNavigation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
86
86
|
preLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<IPreLogin & {
|
|
@@ -125,7 +125,7 @@ declare type DispatchedActions = {
|
|
|
125
125
|
resetLoginState: () => void;
|
|
126
126
|
requestAuthorize: (payload?: boolean) => void;
|
|
127
127
|
requestAuthorizeSSR: (payload: string) => void;
|
|
128
|
-
requestHostedLoginAuthorize: () => void;
|
|
128
|
+
requestHostedLoginAuthorize: (payload?: Record<string, string>) => void;
|
|
129
129
|
handleHostedLoginCallback: (payload: HostedLoginCallback) => void;
|
|
130
130
|
afterAuthNavigation: () => void;
|
|
131
131
|
preLogin: (payload: WithCallback<IPreLogin & {
|
package/auth/index.d.ts
CHANGED
|
@@ -288,7 +288,7 @@ declare const _default: {
|
|
|
288
288
|
setSocialLoginError: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").ISetSocialLoginError], import("@frontegg/rest-api").ISetSocialLoginError, string, never, never>;
|
|
289
289
|
requestAuthorize: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[(boolean | undefined)?], boolean, string, never, never>;
|
|
290
290
|
requestAuthorizeSSR: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[string], string, string, never, never>;
|
|
291
|
-
requestHostedLoginAuthorize: import("@reduxjs/toolkit").
|
|
291
|
+
requestHostedLoginAuthorize: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[(Record<string, string> | undefined)?], Record<string, string> | undefined, string, never, never>;
|
|
292
292
|
handleHostedLoginCallback: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("./LoginState/interfaces").HostedLoginCallback], import("./LoginState/interfaces").HostedLoginCallback, string, never, never>;
|
|
293
293
|
afterAuthNavigation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
294
294
|
preLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").IPreLogin & {
|
package/auth/index.js
CHANGED
|
@@ -140,7 +140,7 @@ const reducers$h = {
|
|
|
140
140
|
const actions$i = {
|
|
141
141
|
requestAuthorize: createAction(`${authStoreName}/requestAuthorize`, (payload = false) => ({ payload })),
|
|
142
142
|
requestAuthorizeSSR: createAction(`${authStoreName}/requestAuthorizeSSR`, (payload) => ({ payload })),
|
|
143
|
-
requestHostedLoginAuthorize: createAction(`${authStoreName}/requestHostedLoginAuthorize
|
|
143
|
+
requestHostedLoginAuthorize: createAction(`${authStoreName}/requestHostedLoginAuthorize`, (payload) => ({ payload })),
|
|
144
144
|
handleHostedLoginCallback: createAction(`${authStoreName}/handleHostedLoginCallback`, (payload) => ({ payload })),
|
|
145
145
|
afterAuthNavigation: createAction(`${authStoreName}/afterAuthNavigation`),
|
|
146
146
|
preLogin: createAction(`${authStoreName}/preLogin`, (payload) => ({ payload })),
|
|
@@ -1593,7 +1593,7 @@ function* requestAuthorizeSSR({ payload: accessToken }) {
|
|
|
1593
1593
|
yield all(calls);
|
|
1594
1594
|
yield put(actions.setState({ isLoading: false }));
|
|
1595
1595
|
}
|
|
1596
|
-
function* requestHostedLoginAuthorize() {
|
|
1596
|
+
function* requestHostedLoginAuthorize({ payload: additionalParams }) {
|
|
1597
1597
|
const { routes, context, onRedirectTo } = yield select((state) => ({
|
|
1598
1598
|
routes: state.auth.routes,
|
|
1599
1599
|
onRedirectTo: state.auth.onRedirectTo,
|
|
@@ -1609,15 +1609,7 @@ function* requestHostedLoginAuthorize() {
|
|
|
1609
1609
|
const baseUrl = fetch.getBaseUrl(context, '/oauth/authorize');
|
|
1610
1610
|
// Hard coded for now
|
|
1611
1611
|
const oauthUrl = `${baseUrl}/oauth/authorize`;
|
|
1612
|
-
const params = {
|
|
1613
|
-
response_type: 'code',
|
|
1614
|
-
client_id: context.clientId || 'INVALID-CLIENT-ID',
|
|
1615
|
-
scope: 'openid email profile',
|
|
1616
|
-
redirect_uri: redirectUrl,
|
|
1617
|
-
code_challenge: code_challenge,
|
|
1618
|
-
code_challenge_method: 'S256',
|
|
1619
|
-
nonce,
|
|
1620
|
-
};
|
|
1612
|
+
const params = Object.assign({ response_type: 'code', client_id: context.clientId || 'INVALID-CLIENT-ID', scope: 'openid email profile', redirect_uri: redirectUrl, code_challenge: code_challenge, code_challenge_method: 'S256', nonce }, additionalParams);
|
|
1621
1613
|
const searchParams = new URLSearchParams(params);
|
|
1622
1614
|
const url = `${oauthUrl}?${searchParams.toString()}`;
|
|
1623
1615
|
onRedirectTo(url, { refresh: true });
|
package/auth/reducer.d.ts
CHANGED
|
@@ -258,7 +258,7 @@ declare const actions: {
|
|
|
258
258
|
setSocialLoginError: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").ISetSocialLoginError], import("@frontegg/rest-api").ISetSocialLoginError, string, never, never>;
|
|
259
259
|
requestAuthorize: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[(boolean | undefined)?], boolean, string, never, never>;
|
|
260
260
|
requestAuthorizeSSR: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[string], string, string, never, never>;
|
|
261
|
-
requestHostedLoginAuthorize: import("@reduxjs/toolkit").
|
|
261
|
+
requestHostedLoginAuthorize: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[(Record<string, string> | undefined)?], Record<string, string> | undefined, string, never, never>;
|
|
262
262
|
handleHostedLoginCallback: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import(".").HostedLoginCallback], import(".").HostedLoginCallback, string, never, never>;
|
|
263
263
|
afterAuthNavigation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
264
264
|
preLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").IPreLogin & {
|
package/node/auth/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var auth_index = require('../index-
|
|
5
|
+
var auth_index = require('../index-c0fe2f70.js');
|
|
6
6
|
var constants = require('../constants-52e37c08.js');
|
|
7
7
|
var restApi = require('@frontegg/rest-api');
|
|
8
8
|
require('@reduxjs/toolkit');
|
|
@@ -59,7 +59,7 @@ const reducers$h = {
|
|
|
59
59
|
const actions$i = {
|
|
60
60
|
requestAuthorize: toolkit.createAction(`${constants.authStoreName}/requestAuthorize`, (payload = false) => ({ payload })),
|
|
61
61
|
requestAuthorizeSSR: toolkit.createAction(`${constants.authStoreName}/requestAuthorizeSSR`, (payload) => ({ payload })),
|
|
62
|
-
requestHostedLoginAuthorize: toolkit.createAction(`${constants.authStoreName}/requestHostedLoginAuthorize
|
|
62
|
+
requestHostedLoginAuthorize: toolkit.createAction(`${constants.authStoreName}/requestHostedLoginAuthorize`, (payload) => ({ payload })),
|
|
63
63
|
handleHostedLoginCallback: toolkit.createAction(`${constants.authStoreName}/handleHostedLoginCallback`, (payload) => ({ payload })),
|
|
64
64
|
afterAuthNavigation: toolkit.createAction(`${constants.authStoreName}/afterAuthNavigation`),
|
|
65
65
|
preLogin: toolkit.createAction(`${constants.authStoreName}/preLogin`, (payload) => ({ payload })),
|
|
@@ -1512,7 +1512,7 @@ function* requestAuthorizeSSR({ payload: accessToken }) {
|
|
|
1512
1512
|
yield effects.all(calls);
|
|
1513
1513
|
yield effects.put(actions.setState({ isLoading: false }));
|
|
1514
1514
|
}
|
|
1515
|
-
function* requestHostedLoginAuthorize() {
|
|
1515
|
+
function* requestHostedLoginAuthorize({ payload: additionalParams }) {
|
|
1516
1516
|
const { routes, context, onRedirectTo } = yield effects.select((state) => ({
|
|
1517
1517
|
routes: state.auth.routes,
|
|
1518
1518
|
onRedirectTo: state.auth.onRedirectTo,
|
|
@@ -1528,15 +1528,7 @@ function* requestHostedLoginAuthorize() {
|
|
|
1528
1528
|
const baseUrl = restApi.fetch.getBaseUrl(context, '/oauth/authorize');
|
|
1529
1529
|
// Hard coded for now
|
|
1530
1530
|
const oauthUrl = `${baseUrl}/oauth/authorize`;
|
|
1531
|
-
const params = {
|
|
1532
|
-
response_type: 'code',
|
|
1533
|
-
client_id: context.clientId || 'INVALID-CLIENT-ID',
|
|
1534
|
-
scope: 'openid email profile',
|
|
1535
|
-
redirect_uri: redirectUrl,
|
|
1536
|
-
code_challenge: code_challenge,
|
|
1537
|
-
code_challenge_method: 'S256',
|
|
1538
|
-
nonce,
|
|
1539
|
-
};
|
|
1531
|
+
const params = Object.assign({ response_type: 'code', client_id: context.clientId || 'INVALID-CLIENT-ID', scope: 'openid email profile', redirect_uri: redirectUrl, code_challenge: code_challenge, code_challenge_method: 'S256', nonce }, additionalParams);
|
|
1540
1532
|
const searchParams = new URLSearchParams(params);
|
|
1541
1533
|
const url = `${oauthUrl}?${searchParams.toString()}`;
|
|
1542
1534
|
onRedirectTo(url, { refresh: true });
|
package/node/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var auth_index = require('./index-
|
|
5
|
+
var auth_index = require('./index-c0fe2f70.js');
|
|
6
6
|
var audits_index = require('./audits/index.js');
|
|
7
7
|
var connectivity_index = require('./connectivity/index.js');
|
|
8
8
|
var subscriptions_index = require('./subscriptions/index.js');
|
package/node/toolkit/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var auth_index = require('../index-
|
|
5
|
+
var auth_index = require('../index-c0fe2f70.js');
|
|
6
6
|
var toolkit = require('@reduxjs/toolkit');
|
|
7
7
|
var createSagaMiddleware = require('redux-saga');
|
|
8
8
|
var effects = require('redux-saga/effects');
|