
Security News
npm v12 Ships With Install Scripts Off by Default, Begins Deprecating 2FA-Bypass Tokens
npm v12 is generally available, turning install scripts off by default and beginning the deprecation of 2FA-bypass publishing tokens.
next-auth-client
Advanced tools
NextAuthClient is session library for the next-auth module.
It is only intended to be used in conjuction with next-auth in Next.js projects.
It exists as a seperate module to reduce the dependancy size.
It provides the following methods, all of which return a promise:
Isometric (runs client and server side). Return the current session.
When using Server Side Rendering and passed req object from getInitialProps({req}) it will read the data from it.
When using Client Side Rendering it will use localStorage (if avalible) to check for cached session data and if not found or expired it call the /auth/session end point.
Client side only method. Request an email sign in token.
Client side only method. Triggers the current session to be destroyed.
Client side only method. Returns the latest CSRF Token.
Note: When rendering server side, this is accessible from NextAuthClient.init().
Client side only method. Returns a list of linked/unlinked oAuth providers.
This is useful on account management pages where you want to display buttons to link / unlink accounts.
Client side only method. Returns a list of all configured oAuth providers.
It includes their names, sign in URLs and callback URLs. This is useful on sign in pages and to check the callback URLs when configuring oAuth providers.
import React from 'react'
import { NextAuth } from 'next-auth-client'
export default class extends React.Component {
static async getInitialProps({req}) {
return {
session: await NextAuth.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>
)
}
}
}
See next-auth for more information or nextjs-starter for a working demo.
FAQs
A client for the next-auth module
The npm package next-auth-client receives a total of 43 weekly downloads. As such, next-auth-client popularity was classified as not popular.
We found that next-auth-client 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
npm v12 is generally available, turning install scripts off by default and beginning the deprecation of 2FA-bypass publishing tokens.

Research
/Security News
Socket tracks the activity as Operation “Muck and Load”: a threat actor uses commit-farming workflows, public dead drops, and protected archives to stage Windows RAT and infostealer malware.

Security News
pnpm 11.10 hardens registry auth to block token redirection, tightens pack-app and deploy, and makes the Rust port (v12) installable.