CoreGo

Auth, databases, email and a web framework for Go, behind one facade.

CoreGo gives your Go API sign-up, sessions, MongoDB and PostgreSQL, transactional email and a web framework. A protected endpoint takes about ten lines.

go get github.com/berkkaradalan/CoreGo@v0.2.0
Get started

A protected API in one file.

One call to corego.New reads your environment, connects your database and starts the auth service.

Six building blocks, one import path.

Secure by default.

  • Tokens hashed at rest

    Session and email tokens are stored as SHA-256 digests; passwords use bcrypt.

  • Single-use, purpose-bound tokens

    A verification link can never reset a password, and no token works twice.

  • No account enumeration

    Password reset and verification answer the same way, in the same time, for every address.

  • CSRF protection

    Cookie sessions reject cross-site requests unless the origin is trusted.

  • Rate limits built in

    Per client IP and per email address on every sensitive route.

  • Safe under concurrency

    Optimistic locking means parallel requests never overwrite each other's changes.