Configuration
Learn how to configure FreeAuth REST API server.
The .env
file is located at the root of a FreeAuth project and can override or extend the application's behavior.
.env
# This will override the value of current AppID
FREEAUTH_APP_ID=freeauth_app_id
Key | Type | Default | Description |
---|---|---|---|
debug | boolean | false | Whether debug mode is enabled. |
testing | boolean | false | Whether testing mode is enabled. You should enable this in your own tests. |
freeauth_app_id | string | Current FreeAuth App ID | |
EdgeDB settings | |||
edgedb_instance | string | The name of a local instance. Only useful in development. | |
edgedb_database | string | edgedb | The name of EdgeDB database. |
edgedb_dsn | string | EdgeDB connection string. See the DSN Specification. | |
Authentication settings | |||
jwt_algorithm | string | HS256 | The algorithm to use for signing the JWT claims. |
jwt_token_ttl | integer | 1440 | The JWT token expiration time in minutes. |
jwt_secret_key | string | secret_key | The key to use for signing the JWT claim set. |
jwt_cookie_key | string | access_token | The key name of the JWT cookie. |
jwt_cookie_secure | boolean | true | Browsers will only send cookies with requests over HTTPS if the cookie is marked secure . |
verify_code_ttl | integer | 10 | The verification codes' expiration time in minutes. |
verify_code_cool_down | integer | 60 | The verification codes' cool-down period in seconds. |
Mail settings | |||
mail_from_name | string | FreeAuth | The name of sender. |
mail_from | string | The sender address. | |
mail_username | string | The username of the email service. | |
mail_password | string | The password of the email service. | |
mail_port | integer | 25 | The port number of the mail server. |
mail_server | string | localhost | SMTP Mail server. |
mail_starttls | boolean | false | For STARTTLS connections |
mail_ssl_tls | boolean | false | For connecting over TLS/SSL |
SMS settings | |||
sms_provider | string | The name of the SMS provider, which can be tencent-cloud or aliyun . | |
sms_secret_id | string | The SecretId which is used to identify a provider. | |
sms_secret_key | string | The SecretKey which is used to verify a provider. You must keep your SecretKey secret confidential. | |
sms_sign_name | string | The content of SMS signature. | |
sms_region | string | For tencent-cloud provider only, the region where TencentCloud SMS service is located, see available regions. | |
sms_app_id | string | For tencent-cloud provider only, SMS SDKAppID generated after and application is added in the TencentCloud console. | |
sms_auth_code_tpl_id | string | The template code/ID for auth code. |