Guardian Setup Guide

Follow these simple steps to get Guardian up and running.

1

Prerequisites

  • Docker
  • Maven
2

Clone the Repository

git clone https://github.com/dream-sports-labs/guardian.git cd guardian
3

Start Guardian

./quick-start.sh
4

Test the Setup

Test with a passwordless flow using the following curl commands:

Initialize passwordless authentication
curl --location 'localhost:8080/v1/passwordless/init' \
--header 'Content-Type: application/json' \
--header 'tenant-id: tenant1' \
--data '{
  "flow": "signinup",
  "responseType": "token",
  "contacts": [{
    "channel": "sms",
    "identifier": "9999999999"
  }],
  "metaInfo": {
    "ip": "127.0.0.1",
    "location": "localhost",
    "deviceName": "localhost",
    "source": "app"
  }
}'
Complete authentication (using mock OTP)
curl --location 'localhost:8080/v1/passwordless/complete' \
--header 'Content-Type: application/json' \
--header 'tenant-id: tenant1' \
--data '{
  "state": "<state-from-init-response>",
  "otp": "999999"
}'
5

Configuration

Guardian offers extensive configuration options for authentication methods, database connections, email settings, and more.

Next Steps

Now that you have Guardian up and running, explore the documentation to learn more about its features and how to integrate it with your applications.