Skip to content

Authentication with GitHub OAuth #18

@Rindrics

Description

@Rindrics

Description

Implement authentication to allow the owner to edit data via the Web UI while keeping the site publicly readable.

Dependencies

Tasks

  • Set up Auth.js (@auth/sveltekit)
  • Configure GitHub OAuth provider
  • Implement login/logout UI
  • Add authorization check (owner-only write access)
  • Protect API routes for write operations

Technology Selection

  • Auth Library: Auth.js (@auth/sveltekit)
  • OAuth Provider: GitHub

Authentication Flow

1. General users → View site (no auth required)
2. Owner → Click "Login" → GitHub OAuth → Authenticated
3. After auth → "Add" / "Edit" buttons appear in UI
4. On write → Call GitHub API with owner's token

Considerations

  • Only the repository owner should have write access
  • Public users should be able to browse without authentication
  • Use environment variables for OAuth credentials

Deliverables

  • Working GitHub OAuth integration
  • Login/logout functionality
  • Authorization-protected write operations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions