Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amplify-react-router

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amplify-react-router

AWS Amplify's Auth wrapped with reach router

  • 1.0.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-20%
Maintainers
1
Weekly downloads
 
Created
Source

amplify-react-router

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.

Installation

npm install amplify-react-router aws-amplify-react aws-amplify @reach/router --save

Usage

import React from 'react';
import AmplifyRouter from 'amplify-reacr-router';

import MySignIn from './SignIn';
import Page from './Page';
import awsExports from './aws-exports';

export default () => (
    <AmplifyRouter
        amplifyConfig={awsExports}
        homeRoute="/home"
        componentOverrides={[MySignIn]}
    >
        <Page path="/home" />
    </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.

Props

All the base Authenticator Props plus the below.

Prop NameTypesDefaultDescription
componentOverridesArray(Component)OptionalThe auth components you want to override
homeRouteString/The home route to navigate to when once signed in

Keywords

FAQs

Package last updated on 10 Apr 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc