- Credentials
NEXT_PUBLIC_BASE_API=http://localhost:5001/api/v1
- Install dependencies:
npm install
- Create env file:
cp .env.local.example .env.local
- Run dev server:
npm run dev
- Credentials provider posts to
/auth/loginon your configured base API. - NextAuth endpoint is
/api/auth/[...nextauth]. GOOGLE_CLIENT_SECRETmust be the OAuth Client Secret from Google Cloud Console credentials, not an access token (tokens often start withya29.).- Social login flow (Google):
- After OAuth callback, frontend exchanges Google tokens with backend via:
AUTH_SOCIAL_GOOGLE_ENDPOINT(default:/auth/oauth/google)- Backend should return app user + app access token in one of these shapes:
{ token, data },{ accessToken, user }, or equivalent.