Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/umar-ahmed/keycloak-passport-test
https://github.com/umar-ahmed/keycloak-passport-test
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/umar-ahmed/keycloak-passport-test
- Owner: umar-ahmed
- License: mit
- Created: 2019-10-09T03:53:35.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-03T07:47:25.000Z (almost 2 years ago)
- Last Synced: 2024-11-30T19:56:25.099Z (22 days ago)
- Language: JavaScript
- Size: 434 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Next.js Authentication Tutorial
So you are thinking about developing your next great application with Next.js, huh? Or maybe you already started developing it and now you want to add authentication to your app. Either way, you are in the right place. If you are just starting to build your app with Next.js, now it is a good time to learn how to add authentication to it. If you already have something going on, it is never late to add authentication the right way.
In this article, you will learn how to leverage [Passport](http://www.passportjs.org/) to secure your Next.js app. What is cool about the approach you will learn here is that it even supports Server-Side Rendering (SSR) of protected routes. That is, with this setup, if an unknown user requests a secured route (those that are only accessible by authenticated users), your app will redirect them to the login page. On the other hand, if an authenticated user tries to load the same route, your Next.js app will recognize them and render the page on the server. Sounds cool?
Read more at: [https://auth0.com/blog/next-js-authentication-tutorial](https://auth0.com/blog/next-js-authentication-tutorial)