New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

amplify-auth-next-storage

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amplify-auth-next-storage

Isomorphic cookie storage for Next.js apps using @aws-amplify/auth

  • 0.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
decreased by-61.9%
Maintainers
1
Weekly downloads
 
Created
Source

amplify-auth-next-storage

Isomorphic cookie storage for Next.js apps using @aws-amplify/auth

Installation

$ npm install amplify-auth-next-storage

Usage

import Auth from '@aws-amplify/auth';
import NextStorage from 'amplify-auth-next-storage';

Component.getInitialProps = async (ctx) => {
  Auth.configure({
    region: 'us-east-1',
    userPoolId: 'us-east-1_xxxxx',
    userPoolWebClientId: 'xxxxxxxxxxxxxxx',
    storage: new NextStorage(ctx, {
      domain: '.yourdomain.com',
      expires: 365,
      path: '/',
      secure: true,
    }),
  });

  return {};
};

Options

new NextStorage(ctx, options)
  • ctx is the Next.js ctx object
  • options are identical to Amplify's cookieStorage configuration options.

https://aws-amplify.github.io/docs/js/authentication#manual-setup

OptionTypeDefaultDescription
domain (required)stringnoneCookies domain
expiresnumber365Cookie expiration in days
pathstring/Cookies path
securebooleantrueCookie secure flag

Keywords

FAQs

Package last updated on 25 Jan 2020

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