This is an API built with Express, Prisma and TypeScript which aims to replace our self-hosted Supabase GoTrue instance.
To run this API, you will need:
- Node.js (version 16 or higher)
- npm
- Clone this repository to your local machine.
git clone https://github.com/WalletConnect/cloud-auth-api.git
- Install the dependencies.
cd cloud-auth-api
npm install
- Set up your environment variables
cp .env.example .env
- Set up Prisma
npx prisma generate
// optionally, you can run Prisma Studio
npx prisma studio
- Start the development server.
npm run dev
The server will start on port 3333. You can access it at http://localhost:3333
.
- Alternatively you can run the docker containers
docker-compose build && docker-compose up
This API has the following endpoints:
GET /nonce
- Gets a nonce.POST /connect
- Creates a new user along with a session, an identity and gerenates access and refresh tokens. If the user already exists, it'll get updated and new access and refresh tokens will be generated.
- Staging: https://staging.cloud-auth-api.reown.com/health
- Production: https://cloud-auth-api.reown.com/health