mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
Cleanup redirection url in redux state.
This commit is contained in:
parent
d2a547eca6
commit
61946929d2
|
@ -3,7 +3,6 @@ import {
|
||||||
FETCH_STATE_REQUEST,
|
FETCH_STATE_REQUEST,
|
||||||
FETCH_STATE_SUCCESS,
|
FETCH_STATE_SUCCESS,
|
||||||
FETCH_STATE_FAILURE,
|
FETCH_STATE_FAILURE,
|
||||||
SET_REDIRECTION_URL,
|
|
||||||
} from "../../constants";
|
} from "../../constants";
|
||||||
import RemoteState from '../../../views/AuthenticationView/RemoteState';
|
import RemoteState from '../../../views/AuthenticationView/RemoteState';
|
||||||
|
|
||||||
|
@ -19,7 +18,3 @@ export const fetchStateFailure = createAction(FETCH_STATE_FAILURE, resolve => {
|
||||||
return resolve(err);
|
return resolve(err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export const setRedirectionUrl = createAction(SET_REDIRECTION_URL, resolve => {
|
|
||||||
return (url: string) => resolve(url);
|
|
||||||
})
|
|
|
@ -6,15 +6,12 @@ import RemoteState from '../../../views/AuthenticationView/RemoteState';
|
||||||
export type Action = ActionType<typeof Actions>;
|
export type Action = ActionType<typeof Actions>;
|
||||||
|
|
||||||
interface State {
|
interface State {
|
||||||
redirectionUrl : string | null;
|
|
||||||
remoteState: RemoteState | null;
|
remoteState: RemoteState | null;
|
||||||
remoteStateLoading: boolean;
|
remoteStateLoading: boolean;
|
||||||
remoteStateError: string | null;
|
remoteStateError: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const initialState: State = {
|
const initialState: State = {
|
||||||
redirectionUrl: null,
|
|
||||||
|
|
||||||
remoteState: null,
|
remoteState: null,
|
||||||
remoteStateLoading: false,
|
remoteStateLoading: false,
|
||||||
remoteStateError: null,
|
remoteStateError: null,
|
||||||
|
@ -41,11 +38,6 @@ export default (state = initialState, action: Action): State => {
|
||||||
remoteStateError: action.payload,
|
remoteStateError: action.payload,
|
||||||
remoteStateLoading: false,
|
remoteStateLoading: false,
|
||||||
};
|
};
|
||||||
case getType(Actions.setRedirectionUrl):
|
|
||||||
return {
|
|
||||||
...state,
|
|
||||||
redirectionUrl: action.payload,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
|
@ -4,9 +4,6 @@ export const FETCH_STATE_SUCCESS = '@portal/fetch_state_success';
|
||||||
export const FETCH_STATE_FAILURE = '@portal/fetch_state_failure';
|
export const FETCH_STATE_FAILURE = '@portal/fetch_state_failure';
|
||||||
|
|
||||||
// AUTHENTICATION PROCESS
|
// AUTHENTICATION PROCESS
|
||||||
|
|
||||||
export const SET_REDIRECTION_URL = '@portal/authenticate/set_redirection_url';
|
|
||||||
|
|
||||||
export const AUTHENTICATE_REQUEST = '@portal/authenticate_request';
|
export const AUTHENTICATE_REQUEST = '@portal/authenticate_request';
|
||||||
export const AUTHENTICATE_SUCCESS = '@portal/authenticate_success';
|
export const AUTHENTICATE_SUCCESS = '@portal/authenticate_success';
|
||||||
export const AUTHENTICATE_FAILURE = '@portal/authenticate_failure';
|
export const AUTHENTICATE_FAILURE = '@portal/authenticate_failure';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user