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

next-auth-client

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-auth-client

A client for the next-auth module

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
32
decreased by-67.68%
Maintainers
1
Weekly downloads
 
Created
Source

Next Auth Client

This a client for an upcoming module called next-auth.

It is an isometric library designed for use with React.

You can use it in Next.js projects to add authentication to your site.

Example usage

import React from 'react'
import { Session } from 'next-auth-client'

export default class extends React.Component {
  static async getInitialProps({req}) {
    return {
      session: await Session.init({req})
    }
  }
  render() {
    if (this.props.session.user) {
      return(
        <div>
          <p>You are logged in as {this.props.session.user.name || this.props.session.user.email}.</p>
        </div>
        )
    } else {
      return(
        <div>
          <p>You are not logged in.</p>
        </div>
      )
    }
  }
}

Additional usage information and examples will follow once the next-auth module is live.

-- January 2018

FAQs

Package last updated on 27 Jan 2018

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