Search code examples
apache-superset

How to skip the Superset signin page


I have integrated Superset with auth0.

as per my requirement, I don't need the default superset login page:

Please click to view the initial Logon page

I need to skip the above login page; I have to use Auth0 sign page as below,

Click here to view Auth0 Login Page

How can I do this?


Solution

  • To use custom login page you should implement custom Superset security manager which will solve the problem.

    At first, you should create new file, e.g. my_security_manager.py. Put these lines into it:

    from superset.security import SupersetSecurityManager
    
    class MySecurityManager(SupersetSecurityManager):        
        def __init__(self, appbuilder):
            super(MySecurityManager, self).__init__(appbuilder)
    

    Secondly, you should let Superset know that you want to use your brand new security manager. To do so, add these lines to your Superset configuration file (superset_config.py):

    from my_security_manager import MySecurityManager
    CUSTOM_SECURITY_MANAGER = MySecurityManager
    

    Then you can override authdbview property of MySecurityManager class with your custom view and show custom login page.