From 86417e7047784485860b2c691abe80089f1b7195 Mon Sep 17 00:00:00 2001 From: ditaajipratama Date: Mon, 17 Jun 2024 17:48:14 +0700 Subject: [PATCH] Environment variables --- app/config/globalvar.py | 49 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/app/config/globalvar.py b/app/config/globalvar.py index 5dd3e9d..4f0120a 100644 --- a/app/config/globalvar.py +++ b/app/config/globalvar.py @@ -2,10 +2,57 @@ title = "Authsquare" header = f"Welcome to {title}" copyright = "Copyright (C) 2024 Dita Aji Pratama" -menu = { production = False su_mode = True +auth_key = 'your_key' + +ssh = { + "key":{ + "private" : "/root/.ssh/id_rsa", + "public" : "/root/.ssh/id_rsa.pub" + }, + "passphrase" : None # use b'value' if use passphrase +} + +reCAPTCHA = { + "client" : "your_key", + "server" : "your_key" +} + +smtpconfig = { + "login" : { + "email" : "user@domain.com", + "password" : "your_password" + }, + "server" : { + "host" : "smtp.domain.com", + "port" : 587 + }, + "from" : "user@domain.com" +} + +baseurl = "https://domain.com" +if production == False: + baseurl = "http://localhost:15001" + +def resend_url(email): + url = f"{baseurl}/api/auth/registration/resend?email={email}" + return url + +def notme_url(token): + url = f"{baseurl}/notme?token={token}" + return url + +def verification_url(token): + url = f"{baseurl}/verify?token={token}" + return url + +def change_forgot_url(token): + url = f"{baseurl}/portal/change/forgot?token={token}" + return url + +menu = { "public": { "navbar": [ {