'While logging in through admin in Apache superset it redirects me back to login page

I installed apache superset v1.4.1 successfully without any errors on my work machine(aws instance ec2 ubuntu 20) when i try to login through admin it redirects me back to login page...when i checked the logs it was throwing

WARNING:root:Class 'werkzeug.local.LocalProxy' is not mapped and INFO:flask_wtf.csrf:The CSRF session token is missing. 400 Bad Request: The CSRF session token is missing. 2022-04-08 19:17:37,057:WARNING:superset.views.base:400 Bad Request: The CSRF session token is missing.

Then i edited config.py file and edited WTF_CSRF_ENABLED = True to WTF_CSRF_ENABLED = False and re-launched it by executing superset init command but still when i try to login it redirects me back to login page and now the log just shows WARNING:root:Class 'werkzeug.local.LocalProxy' is not mapped

Not able to login inside so no chance of creating any other roles(public, gamma etc) Please anyone help me solve this issue i have been trying to solve this from 3 days

I have the same version of superset on my local ubuntu machine but everything works fine in my local machine I am able to login, able to create dashboard, other roles etc

In superset which i am facing error runs on HTTPS so do i need to make any other changes in config.py file...whereas the superset which runs fine for me is runnning on HTTP.



Solution 1:[1]

We suffered exactly the same problem for 2 days. After our hard-work, we confirm that by disabling BOTH the following two settings, this login problem is fixed.

# Comment settings as below:
#SESSION_COOKIE_SAMESITE = "None"
#SESSION_COOKIE_SECURE = True

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 user1925936