Skip to content
This repository has been archived by the owner on Oct 27, 2023. It is now read-only.

Latest commit

 

History

History
33 lines (22 loc) · 893 Bytes

AUTHENTICATION.md

File metadata and controls

33 lines (22 loc) · 893 Bytes

1. NEXTAUTH

The authentication in the project is composed by two parts; A Metamask Wallet and a Github Provider using NextAuth.

NextAuth requires a environment key to be able to use JWT, so to generate the key, run:

$ openssl rand -base64 32

Then fill in the value into .env file;

# .env

NEXTAUTH_SECRET=yourKey
NEXTAUTH_URL=http://localhost:3000 or yourDomain.

2. GITHUB OAUTH

A Github Github OAuthApp is needed to complete the authentication flow; its callback url must be [yourdomain]/api/auth/callback/github.

Update the environment variables with the client id and secret;

# .env

## GitHub
# Create a github OAuthApp and add information here
NEXT_GH_CLIENT_ID=
NEXT_GH_SECRET=