This PR adds authentication to this app and makes it required to Login with Google to use the application. Users will get the ability to restore 5 photos per day.
We use next-auth to do the auth, then prisma + Neon to store user accounts. We're also now doing rate limiting by email.
Auth setup
Use openssl rand -base64 32 to generate NEXTAUTH_SECRET
Add DB URL and SHADOW DB URL from Neon
Create a new project in console.cloud.google.com
Click configure consent screen in API credentials page and click external
Add an app name, do not upload logo, add authorized domain
Publish app
Create credentials -> Oauth client ID
Run npx prisma db push && prisma migrate dev && prisma generate
Add auth
This PR adds authentication to this app and makes it required to Login with Google to use the application. Users will get the ability to restore 5 photos per day.
We use next-auth to do the auth, then prisma + Neon to store user accounts. We're also now doing rate limiting by email.
Auth setup
openssl rand -base64 32
to generate NEXTAUTH_SECRET