Landing page with OAuth

I am using OAuth and I would like to get an unauthenticated landing page. I tried to use --index or --auth-template but it does not seem to do the trick. I get directly redirected to the OAuth page.

Is there a simple way to do that? The next thing I am thinking about is to use something like FastAPI before Panel. But then I should probably move the OAuth layer to FastAPI if I do that.

Apparently it’s not yet possible. One way to get there though is to use a custom OAuth plugin as described in the doc.

E.g. here is some dummy code showing how it could work:

class GoogleLoginHandler(OAuthIDTokenLoginHandler, OAuth2Mixin):

        "Content-Type": "application/x-www-form-urlencoded; charset=utf-8"


    _SCOPE = ['profile', 'email']

    _USER_KEY = 'email'

    ##### Madness starts here ######

    def _simple_get(self):
        html = BASIC_LOGIN_TEMPLATE.render(

    async def get(self):
        if "state" not in self.request.uri:
            await super().get()

    async def post(self):
        await super().get()
1 Like