Complete the code to import the NextAuth function from the correct package.
import NextAuth from '[1]';
The NextAuth function is imported from the next-auth package, which is the official library for authentication in Next.js.
Complete the code to export the NextAuth handler as the default export.
export default NextAuth([1]);The NextAuth function expects a configuration object, often named config, which includes providers and other settings.
Fix the error in the providers array by completing the import for GitHub.
import GitHub from '[1]';
The correct import path for GitHub is next-auth/providers/github with lowercase 'github'.
Fill both blanks to complete the providers array with GitHub and its clientId and clientSecret.
providers: [GitHub({ clientId: process.env.[1], clientSecret: process.env.[2] })]The environment variables for GitHub OAuth are usually named GITHUB_ID and GITHUB_SECRET.
Fill all three blanks to add a secret, enable debug mode, and set a custom session strategy.
export default NextAuth({ providers, secret: process.env.[1], debug: [2], session: { strategy: '[3]' } });The secret is stored in NEXTAUTH_SECRET. Debug mode is enabled with true. The session strategy can be set to jwt for JSON Web Tokens.