Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
amplify-react-router
Advanced tools
Router Wrapper around the Authenticator from aws-amplify-react
Having to rely on local authState
is a pain the butt when you want to use a router as well as overriding the default components. This component makes that even easier now.
yarn add amplify-react-router aws-amplify-react aws-amplify react-router-dom
import React from 'react';
import AmplifyRouter from 'amplify-react-router';
import { Router, navigate } from '@reach/router';
import MySignIn from './SignIn';
import Page from './Page';
import awsExports from './aws-exports';
export default () => (
<AmplifyRouter
amplifyConfig={awsExports}
homeRoute="/home"
navigate={navigate}
componentOverrides={[MySignIn]}
>
<Router>
<Page path="/home" />
</Router>
</AmplifyRouter>
);
You no longer have to pass in the hide
property for components you want to override. Only pass in the components to the hide
prop that you want to actually hide.
All overriden components should be placed in the componentOverrides
and will auto hide their super class
s component.
All the base Authenticator Props plus the below.
Prop Name | Types | Default | Description |
---|---|---|---|
componentOverrides | Array(Component) | Optional | The auth components you want to override |
homeRoute | String | / | The home route to navigate to when once signed in |
navigate | (route: string) => void | Function that takes new route to optionally push to history api for router. |
FAQs
AWS Amplify's Auth wrapped with reach router
We found that amplify-react-router 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.