next-auth-dynamodb
    TypeScript icon, indicating that this package has built-in type declarations

    0.3.3 • Public • Published

    next-auth-dynamodb

    A dynamodb provider for next-auth.

    Coverage Status

    Features

    • Saving and retrieving of sessions from dynamodb
    • Seeding of sessions for tests
    • Retrieving of full linked provider information for a user

    Debugging

    Debug logging is built in and to enable it set the environment variable NEXT_AUTH_DYNAMODB_DEBUG to any value. This will return detailed information including the method called and additional information appropriate for that method.

    Example config

    To use next-auth-dynamodb you need to provide it as an adapter in the next-auth config.

    Here is an example config for use with GitHub login.

    import { NextApiRequest, NextApiResponse } from "next";
    import NextAuth, { InitOptions } from "next-auth";
    import Providers from "next-auth/providers";
    import NextAuthDynamodb from "next-auth-dynamodb";
    
    const options: InitOptions = {
      debug: Boolean(process.env.NEXT_AUTH_DEBUG),
      providers: [
        Providers.GitHub({
          clientId: process.env.GITHUB_CLIENT_ID!,
          clientSecret: process.env.GITHUB_CLIENT_SECRET!,
          scope: "user",
        }),
      ],
      adapter: NextAuthDynamodb,
      session: {
        jwt: false,
      },
    };
    
    export default (req: NextApiRequest, res: NextApiResponse) =>
      NextAuth(req, res, options);

    Support

    next-auth-dyanmodb is provided as-is, free of charge. For support, you have a few choices:

    Install

    npm i next-auth-dynamodb

    DownloadsWeekly Downloads

    6

    Version

    0.3.3

    License

    MIT

    Unpacked Size

    39.5 kB

    Total Files

    16

    Last publish

    Collaborators

    • tgandrews