Fix: User login on production.
This commit is contained in:
@@ -53,6 +53,7 @@ def handle_db_disconnect(f):
|
||||
# User authentication
|
||||
@routes_user.route("/login", methods=['POST', 'OPTIONS'])
|
||||
def login():
|
||||
try:
|
||||
Helper_App.console_log('login')
|
||||
Helper_App.console_log(f'method={request.method}')
|
||||
"""
|
||||
@@ -89,7 +90,6 @@ def login():
|
||||
raise BadRequest('Invalid or missing CSRF token')
|
||||
"""
|
||||
# OAuth login
|
||||
try:
|
||||
# callback_login = F'{Model_View_Base.HASH_CALLBACK_LOGIN}{data.get(Model_View_Base.FLAG_CALLBACK, Model_View_Base.HASH_PAGE_HOME)}'
|
||||
|
||||
# encoded_path = quote(data.get(Model_View_Base.FLAG_CALLBACK, Model_View_Base.HASH_PAGE_HOME))
|
||||
|
||||
@@ -39,4 +39,5 @@ class Helper_App(BaseModel):
|
||||
if current_app.app_config.is_development:
|
||||
print(message)
|
||||
elif current_app.app_config.is_production:
|
||||
pass
|
||||
current_app.logger.info(message)
|
||||
@@ -873,12 +873,42 @@ INSERT INTO Shop_User (
|
||||
, firstname
|
||||
, surname
|
||||
, email
|
||||
# email_verified
|
||||
, is_super_user
|
||||
, active
|
||||
, created_by
|
||||
, created_on
|
||||
)
|
||||
VALUES
|
||||
('auth0|6582b95c895d09a70ba10fef', 'Teddy', 'Middleton-Smith', 'edward.middletonsmith@gmail.com', 1),
|
||||
('parts_guest', 'Guest', '', '', 0)
|
||||
(
|
||||
'auth0|6582b95c895d09a70ba10fef' -- id_user_auth0
|
||||
, 'Teddy' -- firstname
|
||||
, 'Middleton-Smith' -- surname
|
||||
, 'edward.middletonsmith@gmail.com' -- email
|
||||
, 1 -- is_super_user
|
||||
, 1 -- active
|
||||
, 1 -- created_by
|
||||
, current_timestamp() -- created_on
|
||||
),
|
||||
(
|
||||
'parts_guest' -- id_user_auth0
|
||||
, 'Guest' -- firstname
|
||||
, '' -- surname
|
||||
, '' -- email
|
||||
, 0 -- is_super_user
|
||||
, 1 -- active
|
||||
, 1 -- created_by
|
||||
, current_timestamp() -- created_on
|
||||
),
|
||||
(
|
||||
'auth0|672659014296b7f94a9bab45' -- id_user_auth0
|
||||
, 'Tierney' -- firstname
|
||||
, 'Gullen' -- surname
|
||||
, 'tierneybailey13@gmail.com' -- email
|
||||
, 1 -- is_super_user
|
||||
, 1 -- active
|
||||
, 1 -- created_by
|
||||
, current_timestamp() -- created_on
|
||||
)
|
||||
;
|
||||
|
||||
# User Role link
|
||||
|
||||
Reference in New Issue
Block a user