Question · Vibe coding with Claude Code course · Module 15: Advanced Claude Code
Quiz: A key in NEXT_PUBLIC_
Claude put the tags service key in the NEXT_PUBLIC_TAGS_API_KEY variable and reads it in a component with "use client". Lint, tsc and the build pass. What do you do?
Answer options
- I leave it, because lint, tsc and the build reported no warning
- I add .env.local to .gitignore, because then the key will not leave my computer
- I add a deny rule Read(./.env.local), so that Claude does not see the key
- I move the service call to a server route that reads TAGS_API_KEY without the prefix, and I replace at the provider a key that reached a deployed bundle
You can check the correct answer by solving this task in the CodeWorlds game.