reloopsh/be-auth

By reloopsh

Updated 4 days ago

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

Image
Security
Web servers
0

2.6K

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_URLPostgreSQL connection string
REDIS_URLRedis connection string
NATS_URLNATS messaging server URL
BASE_URLPublic base URL of the platform
BETTER_AUTH_SECRETSecret key for session signing
GOOGLE_CLIENT_IDGoogle OAuth client ID
GOOGLE_CLIENT_SECRETGoogle OAuth client secret
GITHUB_CLIENT_IDGitHub OAuth client ID
GITHUB_CLIENT_SECRETGitHub OAuth client secret
DEFAULT_OTPOverride OTP for testing
DISABLE_SIGNUPSet 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:51b5561b2

Size

430.1 MB

Last updated

4 days ago

docker pull reloopsh/be-auth