USRSE / USRSE/usrse.github.io

feat(auth): integrate WorkOS for authentication and RBAC

Open
#1,918 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
33
Forks
104
Avg merge
12h 3m
Merged PRs (30d)
10

Description

Summary

Integrate WorkOS for member authentication with support for email/password, social login, and institutional SSO. Implement role-based access control for member vs admin routes.

Requirements

  • WorkOS SDK integration (User Management API)
  • Sign-up flow with email verification
  • Sign-in flow (email/password + social providers)
  • Session management (JWT or session tokens)
  • Role-based middleware: protect admin routes, member-only routes
  • Sign-out with session cleanup
  • Auth context provider for React (current user, roles, loading state)
  • Protected route wrapper components (<RequireAuth>, <RequireAdmin>)
  • Handle auth callback redirects
  • Error states: expired session, unauthorized access, verification pending

Context

Parent issue: #1916
Depends on: #1917 (database schema for users/roles/sessions)

Implementation Notes

  • WorkOS provides institutional SSO/SAML which is valuable for university members
  • Use WorkOS webhooks to sync user creation/updates to our DB
  • Store minimal user data in our DB (WorkOS is source of truth for auth, we extend with profile data)
  • Consider WorkOS AuthKit for pre-built UI components vs custom forms

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by reviewing parent issue #1916 and dependency #1917, then map the listed WorkOS flows, session handling, role middleware, React auth context, protected routes, callbacks, webhooks, and error states. Done means all listed requirements are implemented and the authentication and authorization flows work end to end.

Written by the indexing model from the issue text.

Assessment

Tech stack
react
Domain
authentication, authorization, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.