The base of this app is the Auth0 Next.js SDK Sample Application
This sample demonstrates the integration of Auth0 Next.js SDK into a Next.js application created using create-next-app. The sample is a companion to the Auth0 Next.js SDK Quickstart.
We then modified the base to add the Bank themeing and calls to Pangea's AuthZ Service to manage access using Auth0's user.sub
- Create a Free Auth0 Account by going to Auth0 and click Sign Up.
- Create a free Pangea Account and enable AuthZ. The exact configuration depends on your specifc use cases.
-
Copy the project down
-
Rename
.env.local.example
to.env.local
-
Replace the Auth0 Domain, Client ID and Client Secret in the
.env.local
for the authentication flow to work. (see more info about loading environmental variables in Next.js):
Note: Make sure you replace AUTH0_SECRET
with your own secret (you can generate a suitable string using `openssl rand
-
Replace PANGEA_TOKEN and PANGEA_DOMAIN with the values from Pangea AuthZ Overview page
-
Use
npm
to install the project dependencies:
npm install
This compiles and serves the Next.js app and starts the API server on port 3001.
npm run dev
Auth0 helps you to:
- Add authentication with multiple sources, either social identity providers such as Google, Facebook, Microsoft Account, LinkedIn, GitHub, Twitter, Box, Salesforce (amongst others), or enterprise identity systems like Windows Azure AD, Google Apps, Active Directory, ADFS, or any SAML Identity Provider.
- Add authentication through more traditional username/password databases.
- Add support for linking different user accounts with the same user.
- Support for generating signed JSON Web Tokens to call your APIs and flow the user identity securely.
- Analytics of how, when, and where users are logging in.
- Pull data from other sources and add it to the user profile through JavaScript rules.