codebar / codebar/auth

Implement oauth-provider

Open
#3 0 comments 0 reactions 1 assignee View on GitHub

@mroderick is already working on this.

Since Jun 30, 2026.

enhancement
Dominant language
JavaScript
Stars
1
Forks
1
Avg merge
7h 37m
Merged PRs (30d)
3

Description

Codebar Auth as an OAuthprovider that proxies all the other methods.

This should make integration in existing apps, almost trivial.

flowchart TD
    User([Student, Coach, ...<br/>browser])
    Codebar[Codebar Planner, Jobs, ... ]
    CodebarBE[e.g. Codebar Planner Rails<br/>validates tokens via JWKS]

    subgraph AuthService["Codebar Auth"]
        OAuthAPI[OAuth API<br/>/authorize, /token, /userinfo]
        LoginUI[Login UI<br/>provider buttons, magic link form]
        Social[Social login handler<br/>OAuth client to providers]
        Magic[Magic link handler<br/>token email, single-use links]
        Identity[(Identity store<br/>users, linked provider accounts)]
        Sessions[(Session and token store<br/>refresh tokens, auth codes)]
        Signer[Token signer<br/>JWT, JWKS, key rotation]
    end

    Providers[External OAuth providers<br/>GitHub, GitLab, Office 365, Google]
    Email[Email provider<br/>e.g. Twillio/Sendgrid]

    User -->|opens app| Codebar
    Codebar -->|redirect to /authorize| OAuthAPI
    OAuthAPI --> LoginUI
    LoginUI -->|chooses provider| Social
    LoginUI -->|enters email| Magic

    Social <-->|OAuth code exchange| Providers
    Magic -->|sends link| Email

    Social --> Identity
    Magic --> Identity
    Social --> Sessions
    Magic --> Sessions
    OAuthAPI --> Sessions
    OAuthAPI --> Signer

    Signer -.->|JWKS public keys| CodebarBE
    OAuthAPI -->|access + refresh token| Codebar
    Codebar -->|API calls with bearer token| CodebarBE
  • implement better-auth's oauth-provider
  • configure social integrations (e.g. github, gitlab, office365, google, codeberg (?))
  • add ability to link/unlink social integrations via user profile
  • add ability to unlink social integrations via admin

Contributor guide

No contributing guide indexed for this repository

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.