Add Redis-backed Matrix OIDC auth backend and update AuthContext #1
No reviewers
Labels
No labels
bug
codex
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
javascript
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
datenba-ch/matrix-social-invites!1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "codex/create-backend-auth-module-with-oidc"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Motivation
httpOnlycookie so the frontend can rely on a secure server session.Description
server/auth.tswhich implements OIDC discovery or explicit endpoints, PKCE state generation, token exchange,userinfofetching, and session persistence in Redis under keyssession:<id>with aff_sessionsignedhttpOnlycookie and a 7-day TTL.server/index.tswhich mounts an Express app withcookie-parser(signed viaSESSION_COOKIE_SECRET) and routesPOST /api/auth/login,GET /api/auth/callback,POST /api/auth/refresh,POST /api/auth/logout, andGET /api/mewired to the handlers inserver/auth.ts.src/contexts/AuthContext.tsxto remove the local mock/localStorage flow and instead callGET /api/meon mount,POST /api/auth/loginto start the OIDC flow, andPOST /api/auth/logoutto clear the server session; add afetchJsonhelper usingcredentials: 'include'so cookies are sent.package.jsonto include backend runtime dependencies (express,cookie-parser,nanoid,redis) and type dev-dependencies for the new packages.Testing
npm install, but the run failed due to a403 Forbiddenerror fetching@types/cookie-parserfrom the registry, so installation and runtime tests were not completed.Codex Task
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.
⚠️ No Changeset found
Latest commit:
db07b8dcdaMerging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.