Skip to content

Commit

Permalink
Update secret key comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
aw-asana committed Nov 22, 2024
1 parent 43899c4 commit 5e4a9f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/oauth-demo/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
load_dotenv()

app = Flask(__name__)
# Set a secret key to securely sign session cookies and protect session data integrity
# Secret Key: os.urandom(24) generates a random secret key each time the server starts.
# For sessions to persist across server restarts and work in a distributed environment,
# set a consistent secret key (e.g., through environment variables) rather than using a random key.
app.secret_key = os.urandom(24)

# Serve the main HTML page (index.html) from the 'static' directory.
Expand Down

0 comments on commit 5e4a9f3

Please sign in to comment.