Make authentication and authorization easy and free.
Install the EdgeDB CLI (required EdgeDB 3.0+), prep environment, install dependencies, and initial project:
make setup
During the first installation, you will enter an interactive session to initialize the EdgeDB project:
Specify the name of EdgeDB instance to use with this project [default: FreeAuth]:
> FreeAuth
Note: Instance name must follow the pattern defined by the regular expression: ^[a-zA-Z_0-9]+(-[a-zA-Z_0-9]+)*$
.
If you already have a FreeAuth instance in your local environment, you can choose to use the same FreeAuth instance in your project:
Do you want to use existing instance "FreeAuth" for the project? [y/n]
> y
make dev
After executing the make setup
command, you will have a .env
file under freeauth-admin
folder.
You could overwrite mail-related settings in the .env
file, which includes:
- MAIL_FROM_NAME: default
FreeAuth
- MAIL_FROM: default
None
- MAIL_USERNAME: default
None
- MAIL_PASSWORD: default
None
- MAIL_PORT: default
25
- MAIL_SERVER: default
localhost
- MAIL_STARTTLS: default
False
- MAIL_SSL_TLS: default
False
Each is explained in https://sabuhish.github.io/fastapi-mail/getting-started/#connectionconfig-class
We support the following SMS providers:
You could overwrite SMS-related settings in the .env
file, which includes:
- SMS_PROVIDER: default
None
, the name of the SMS provider, which can betencent-cloud
oraliyun
. - SMS_SECRET_ID: default
None
- SMS_SECRET_KEY: default
None
- SMS_REGION: default
None
, fortencent-cloud
only, the region where TencentCloud SMS service is located, see available regions. - SMS_APP_ID: default
None
, fortencent-cloud
only, theSDKAppID
after adding an application in the TencentCloud console. - SMS_AUTH_CODE_TPL_ID: default
None
, the template code for auth code.
edgedb ui
- Swagger UI: http://localhost:5001/docs
- ReDoc: http://localhost:5001/redoc
- Create a migration:
make db
- Apply migrations:
make up
make genqlapi
Execute the following command to apply formatting:
make lint
Run all the tests with:
make test
Reset test DB before running tests (if any schema changes):
make testdb