Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@next-auth/dynamodb-adapter
Advanced tools
You need a table with as partition key pk
and as sort key sk
. Your table also need a global secondary index names GSI1
with GSI1PK
as partition key and GSI1SK
as sorting key. You can set whatever you want as the table name and the billing method.
You need to pass aws-sdk to the adapter in addition to the tablename.
// /pages/api/auth/[...nextauth].js
import AWS from "aws-sdk";
import NextAuth from "next-auth";
import Providers from "next-auth/providers";
import { DynamoDBAdapter } from "@next-auth/dynamodb-adapter"
AWS.config.update({
accessKeyId: process.env.NEXT_AUTH_AWS_ACCESS_KEY,
secretAccessKey: process.env.NEXT_AUTH_AWS_SECRET_KEY,
region: process.env.NEXT_AUTH_AWS_REGION,
});
export default NextAuth({
// Configure one or more authentication providers
providers: [
Providers.GitHub({
clientId: process.env.GITHUB_ID,
clientSecret: process.env.GITHUB_SECRET,
}),
Providers.Email({
server: process.env.EMAIL_SERVER,
from: process.env.EMAIL_FROM,
}),
// ...add more providers here
],
adapter: DynamoDBAdapter({
AWS,
tableName: "next-auth-test",
}),
...
});
(AWS secrets start with NEXT_AUTH_
in order to not conflict with Vercel's reserved environment variables.)
The table respect the single table strucuture. This has many advantages :
Here is a schema of the table :
FAQs
AWS DynamoDB adapter for next-auth.
The npm package @next-auth/dynamodb-adapter receives a total of 1,971 weekly downloads. As such, @next-auth/dynamodb-adapter popularity was classified as popular.
We found that @next-auth/dynamodb-adapter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.