0
0
Supabasecloud~5 mins

Environment variables and secrets in Supabase - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What are environment variables?
Environment variables are like little notes your computer programs read to know important settings, such as passwords or API keys, without hardcoding them in the code.
Click to reveal answer
beginner
Why should secrets not be hardcoded in your code?
Hardcoding secrets risks exposing them if the code is shared or leaked. Using environment variables keeps secrets safe and separate from the code.
Click to reveal answer
intermediate
How does Supabase help manage environment variables and secrets?
Supabase lets you securely store environment variables and secrets in its dashboard, so your apps can access them safely without exposing sensitive data.
Click to reveal answer
beginner
What is a common real-life example of environment variables?
Like a house key you keep safe and use only when needed, environment variables store keys or passwords your app uses to connect to services without showing them openly.
Click to reveal answer
intermediate
What is the difference between environment variables and secrets?
Environment variables are any settings your app reads from outside the code. Secrets are a special kind of environment variable that hold sensitive info like passwords or tokens.
Click to reveal answer
Why should you use environment variables for secrets?
ATo keep sensitive data out of the code and secure
BTo make the code run faster
CTo store images and videos
DTo replace database tables
Where do you typically set environment variables in Supabase?
AIn the Supabase dashboard under project settings
BInside the app's main code file
CIn the browser's console
DOn your phone's settings
Which of these is NOT a good practice for managing secrets?
AUsing secret managers
BUsing environment variables
CHardcoding passwords in code
DRestricting access to secrets
What kind of information is stored as secrets?
AUser interface colors
BFont styles
CPublic blog posts
DAPI keys and passwords
How does using environment variables improve app security?
ABy encrypting the entire app
BBy separating sensitive data from code and controlling access
CBy storing all data in the cloud
DBy making the app load faster
Explain how environment variables and secrets work together in a Supabase project.
Think about how your app gets passwords without showing them in code.
You got /4 concepts.
    Describe why it is important to keep secrets out of your code and how environment variables help.
    Imagine sharing a photo without showing your house keys.
    You got /4 concepts.