https://github.com/srijan-d/next-auth
Implementation of NextAuth.js for authentication using Nextjs
https://github.com/srijan-d/next-auth
authentication google-console next-auth next13 nextjs session
Last synced: about 1 month ago
JSON representation
Implementation of NextAuth.js for authentication using Nextjs
- Host: GitHub
- URL: https://github.com/srijan-d/next-auth
- Owner: Srijan-D
- Created: 2022-09-20T13:57:29.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-30T21:46:00.000Z (about 3 years ago)
- Last Synced: 2025-06-06T03:41:41.731Z (about 1 year ago)
- Topics: authentication, google-console, next-auth, next13, nextjs, session
- Language: JavaScript
- Homepage:
- Size: 23.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Next-Auth
Implementation of NextAuthJS for authentication using Nextjs
prior to this we need to add the callback url in the applications
example for google:
Authorized redirect URIs=http://localhost:3000/api/auth/callback/google
Authentication for other apps need to take place similarly just add the right callback url
Inside the index.js file I have also shown how to use the inbuilt singIn and signOut functions provided by the next-auth library
secret
Default value: string (SHA hash of the "options" object) in development, no default in production.
Required: Yes, in production!
Not providing any secret or NEXTAUTH_SECRET will throw an error in production.
A random string is used to hash tokens, sign/encrypt cookies and generate cryptographic keys.
Custom pages / urls can be specified using the pages option though it is not mandatory even for production