Skip to content

docs: set Firebase session cookie maxAge to match expiresIn - #14534

Merged
ArmandPhilippot merged 2 commits into
withastro:mainfrom
mrchatam:docs/fix-firebase-session-cookie-maxage
Sep 14, 2026
Merged

ArmandPhilippot merged 2 commits into
withastro:mainfrom
mrchatam:docs/fix-firebase-session-cookie-maxage

Conversation

@mrchatam

Copy link
Copy Markdown
Contributor

Description (required)

In the English Firebase auth sign-in example, createSessionCookie() is given a 5-day expiresIn, but cookies.set() only sets path. Without maxAge/expires, the browser treats __session as a session cookie and drops it when the tab closes.

Adds maxAge: fiveDays / 1000 so the browser cookie lifetime matches the Firebase token. English only.

References

Signed-off-by: mrchatam <mrchatam@users.noreply.github.com>
@astrobot-houston

astrobot-houston commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
en/guides/backend/firebase.mdx Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@github-actions

github-actions Bot commented Sep 13, 2026

Copy link
Copy Markdown

Preview deployment

✅ Deployment complete!

@ArmandPhilippot ArmandPhilippot changed the title docs: set Firebase session cookie maxAge to match expiresIn [i18nIgnore] docs: set Firebase session cookie maxAge to match expiresIn Sep 14, 2026

@ArmandPhilippot ArmandPhilippot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your previous PR was a typo fix not affecting other locales, so I have added [i18nIgnore]. Here, we want all locales to update the code snippet, so I removed [i18nIgnore] from the title.

But, thanks, LGTM!

@ArmandPhilippot ArmandPhilippot added the code snippet update Updates a code sample: typo, outdated code etc. label Sep 14, 2026
@ArmandPhilippot
ArmandPhilippot merged commit a01ff4f into withastro:main Sep 14, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code snippet update Updates a code sample: typo, outdated code etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Firebase auth example - Cookie expiration clarification

3 participants