mirror of
https://github.com/plankanban/planka.git
synced 2025-07-19 05:09:43 +02:00
fix: OIDC finalization and refactoring
This commit is contained in:
parent
c21e9cb60a
commit
b9716c6e3a
70 changed files with 753 additions and 427 deletions
|
@ -1,23 +1,33 @@
|
|||
import { bindActionCreators } from 'redux';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import selectors from '../selectors';
|
||||
import entryActions from '../entry-actions';
|
||||
import Login from '../components/Login';
|
||||
|
||||
const mapStateToProps = ({
|
||||
ui: {
|
||||
authenticateForm: { data: defaultData, isSubmitting, error },
|
||||
},
|
||||
}) => ({
|
||||
defaultData,
|
||||
isSubmitting,
|
||||
error,
|
||||
});
|
||||
const mapStateToProps = (state) => {
|
||||
const oidcConfig = selectors.selectOidcConfig(state);
|
||||
|
||||
const {
|
||||
ui: {
|
||||
authenticateForm: { data: defaultData, isSubmitting, isSubmittingWithOidc, error },
|
||||
},
|
||||
} = state;
|
||||
|
||||
return {
|
||||
defaultData,
|
||||
isSubmitting,
|
||||
isSubmittingWithOidc,
|
||||
error,
|
||||
withOidc: !!oidcConfig,
|
||||
};
|
||||
};
|
||||
|
||||
const mapDispatchToProps = (dispatch) =>
|
||||
bindActionCreators(
|
||||
{
|
||||
onAuthenticate: entryActions.authenticate,
|
||||
onAuthenticateWithOidc: entryActions.authenticateWithOidc,
|
||||
onMessageDismiss: entryActions.clearAuthenticateError,
|
||||
},
|
||||
dispatch,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue