fix: OIDC finalization and refactoring

This commit is contained in:
Maksim Eltyshev
2023-10-17 19:18:19 +02:00
parent aae69cb5e4
commit 8e0c60f5be
70 changed files with 753 additions and 427 deletions

View File

@@ -1,6 +1,7 @@
import ActionTypes from '../constants/ActionTypes';
const initializeCore = (
config,
user,
board,
users,
@@ -20,6 +21,7 @@ const initializeCore = (
) => ({
type: ActionTypes.CORE_INITIALIZE,
payload: {
config,
user,
board,
users,

View File

@@ -1,5 +1,12 @@
import ActionTypes from '../constants/ActionTypes';
const initializeLogin = (config) => ({
type: ActionTypes.LOGIN_INITIALIZE,
payload: {
config,
},
});
const authenticate = (data) => ({
type: ActionTypes.AUTHENTICATE,
payload: {
@@ -21,12 +28,33 @@ authenticate.failure = (error) => ({
},
});
const authenticateWithOidc = () => ({
type: ActionTypes.WITH_OIDC_AUTHENTICATE,
payload: {},
});
authenticateWithOidc.success = (accessToken) => ({
type: ActionTypes.WITH_OIDC_AUTHENTICATE__SUCCESS,
payload: {
accessToken,
},
});
authenticateWithOidc.failure = (error) => ({
type: ActionTypes.WITH_OIDC_AUTHENTICATE__FAILURE,
payload: {
error,
},
});
const clearAuthenticateError = () => ({
type: ActionTypes.AUTHENTICATE_ERROR_CLEAR,
payload: {},
});
export default {
initializeLogin,
authenticate,
authenticateWithOidc,
clearAuthenticateError,
};