Sign inSign up

reloopsh/be-auth

By reloopsh

•Updated about 12 hours ago

Authentication & session management service for Reloop — OAuth, email/OTP, and org-based access.

Image
Security
Web servers
0

4.7K

reloopsh/be-auth repository overview

⁠🔐 Reloop — Auth Service

The Auth Service is the central authentication and session management microservice in the Reloop⁠ platform. It handles user sign-up, sign-in, OAuth social logins (Google, GitHub), OTP-based email verification, and organization-scoped session management — all powered by Better Auth⁠.

Built on Bun⁠ + Elysia⁠ for ultra-low latency, backed by PostgreSQL and Redis.


⁠🚀 Features

  • Email & Password Auth — Sign up, login, and password management
  • Social OAuth — Google and GitHub login out of the box
  • OTP / Magic Link — Email-based one-time password support
  • Session Management — Secure session tokens via Redis
  • Organization Support — Multi-tenant org-scoped access control
  • Signup Control — Disable public signups via env flag
  • OpenAPI Docs — Auto-generated spec at /api/auth/openapi
  • NATS Bus — Event-driven integration via the Reloop message bus

ResourceLink
📚 Documentationreloop.sh/docs/setup/backend/auth⁠
🌐 Production APIapi.reloop.sh/api/auth⁠
📜 OpenAPI Specreloop.sh/api/auth/openapi⁠
🐙 Source Codegithub.com/reloop-labs/reloop⁠
💬 Discorddiscord.gg/reloop⁠
🐦 Twitter / X@reloophq⁠
🆘 Supportreloop.sh/support⁠

⁠⚡ Quick Start

docker pull reloopsh/be-auth:latest

docker run -d \
  -p 8000:8000 \
  -e PG_URL=postgresql://user:password@host:5432/reloop \
  -e REDIS_URL=redis://:password@host:6379 \
  -e NATS_URL=nats://host:4222 \
  -e BASE_URL=https://your-domain.com \
  -e BETTER_AUTH_SECRET=your-secret-here \
  -e GOOGLE_CLIENT_ID=your-google-client-id \
  -e GOOGLE_CLIENT_SECRET=your-google-client-secret \
  -e GITHUB_CLIENT_ID=your-github-client-id \
  -e GITHUB_CLIENT_SECRET=your-github-client-secret \
  reloopsh/be-auth:latest

The service will be available at http://localhost:8000/api/auth.


⁠🔧 Environment Variables

VariableDefaultDescription
PORT8000Port the server listens on
PG_URL—PostgreSQL connection string
REDIS_URL—Redis connection string
NATS_URL—NATS messaging server URL
BASE_URL—Public base URL of the platform
BETTER_AUTH_SECRET—Secret key for session signing
GOOGLE_CLIENT_ID—Google OAuth client ID
GOOGLE_CLIENT_SECRET—Google OAuth client secret
GITHUB_CLIENT_ID—GitHub OAuth client ID
GITHUB_CLIENT_SECRET—GitHub OAuth client secret
DEFAULT_OTP—Override OTP for testing
DISABLE_SIGNUP—Set to true to disable public signups
NODE_ENVproductionRuntime environment

⁠🛠 Tech Stack


⁠📦 Part of the Reloop Platform

This image is one of several microservices that make up the Reloop backend. See the full list at hub.docker.com/u/reloopsh⁠.

Tag summary

Content type

Image

Digest

sha256:a5cdfbb8d…

Size

567.9 MB

Last updated

about 12 hours ago

docker pull reloopsh/be-auth