Getting Started with React Auth Lambda
This vertical comes bundled with Nar — no separate download needed.
Configure Credentials
-
Open
{workspace}/{vertical}/services_config/nn_env.json. -
Set
JWT_SECRETto a unique value. -
Create an OAuth 2.0 Client ID (Web application) in the Google Cloud Console.
-
Add
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETtonn_env.json:{
"JWT_ALGORITHM": "HS256",
"JWT_SECRET": "your-unique-secret",
"GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
"GOOGLE_CLIENT_SECRET": "your-client-secret"
}
Deploy Services
-
In the UX, deploy the Auth service.
-
Copy the auth service URL from the deploy output.
-
In Google Cloud Console, add the Authorized redirect URI:
https://<auth-service-url>/oauth/loggedin
Deploy UI
- In the UX, deploy the UI.
- Open your site and log in to verify.
Your React source files are at {workspace}/{vertical}/ui/. See the React UI guide for project structure.
Related
- Environment Variables — Services receive region, site, bucket names, and service URLs automatically. Custom variables go in
nn_env.json. - Auth Service — more on Google OAuth configuration