Skip to content

igdev116/next-auth-with-ssr

Repository files navigation

Next Auth with SSR 🍪

Demo next auth using SSR not Client, save token to cookie.

Features 🚀

  • Back to login page if try to protected page when unauthenticated
  • Back to previous page if try to login when authenticated
  • Return to login page when token is invalid

Install 🔨

  1. Clone Project
  git clone https://github.com/igdev116/next-auth-with-ssr.git
  1. Install Packages
  yarn install
  1. Using
  yarn dev

Structure source 🥘

├── src
│   ├── apis
│   ├── configs
│   ├── constants
│   ├── core
│   ├── layouts
│   ├── pages // include api routes (login, logout, verifyAuth)
│   ├── styles
│   ├── utils
│   └── views // define all pages
└── README.md

About

Authentication using SSR not Client, save token to cookie.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published