
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
amplify-redux-auth
Advanced tools
React component wraps the AWS Amplify that holds auth state within Redux store.
yarn add aws-amplify amplify-redux-auth react react-dom react-redux @material-ui/core
Or
npm install --save aws-amplify amplify-redux-auth react react-dom react-redux @material-ui/core
Note: @material-ui/core
is used by the library and required as Peer Dependencies (to avoid that if @material-ui/core
is used in your application, it will have conflict), this may be changed in the future (remove it as peer dependency).
Note: AWS Amplify Rollup bundling issue, has to make it as peer dependencies.
import { configureAmplify } from 'amplify-redux-auth';
// You can supply AWS Amplify config in you index.ts or index.js just before ReactDOM.render.
// See https://aws-amplify.github.io/docs/js/authentication#manual-setup
const awsAmplifyConfig = {
Auth: {
region: process.env.REACT_APP_AWS_REGION,
identityPoolId: process.env.REACT_APP_COGNITO_IDENTITY_ID,
userPoolId: process.env.REACT_APP_COGNITO_USER_POOL_ID,
userPoolWebClientId: process.env.REACT_APP_COGNITO_WEB_CLIENT_ID
}
};
configureAmplify(awsAmplifyConfig);
ReactDOM.render(rootComponent(), document.getElementById('root'));
// reducers.ts
import { combineReducers } from 'redux';
import { authState } from 'amplify-redux-auth';
export const rootReducer = combineReducers({
authState,
... // your other reducers
});
// sagas.ts
import { sagaMiddleware } from './store';
import { authSagas } from 'amplify-redux-auth';
export const rootSaga = {
run: () => sagaMiddleware.run(authSagas),
.... // your other sagas
};
import ....
import AmplifyReduxAuth, { logout, State, UserData } from 'amplify-redux-auth';
const App = ({ logout, user, loggedIn }) => (
<AmplifyReduxAuth logoText={'My Logo'}>
<div>
You've logged in!
</div>
</AmplifyReduxAuth>
);
const mapStateToProps = (state: State) => ({
user: state.authState.currentUser,
loggedIn: state.authState.loggedIn
});
const mapDispatchToProps = (dispatch: Dispatch) => ({
logout: bindActionCreators(logout, dispatch)
});
export default compose<AppProps, {}>(
connect(mapStateToProps, mapDispatchToProps)
)(App);
<AmplifyReduxAuth AuthComponent={<YourCustomAuth />>
...
</AmplifyReduxAuth>
:shipit: :shipit: :shipit:
@material-ui
as peer dependency.FAQs
React component wraps the AWS Amplify that holds auth state within Redux store.
The npm package amplify-redux-auth receives a total of 19 weekly downloads. As such, amplify-redux-auth popularity was classified as not popular.
We found that amplify-redux-auth demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.