Should TmpAuthenticator replace traitlets with booleans, or provide a new default value?
consideRatio opened this issue · comments
Erik Sundell commented
If we have it like this, I think it makes it impossible for the user to change auto_login if they would like to. Is it a better practice to provide a new default value for the super class' existing auto_login traitlet?
I'm thining for example like:
from traitlets import default
class TmpAuthenticator(Authenticator):
@default("auto_login")
def _auto_login_default(self):
return True
Related
From jupyterhub's auth.py.
auto_login = Bool(
False,
config=True,
help="""Automatically begin the login process
rather than starting with a "Login with..." link at `/hub/login`
To work, `.login_url()` must give a URL other than the default `/hub/login`,
such as an oauth handler or another automatic login handler,
registered with `.get_handlers()`.
.. versionadded:: 0.8
""",
)
Yuvi Panda commented
Might be useful to try it out, would allow us to have an actual home page with a 'login' button. This wasn't required for tmpnb so we didn't support it. We could support it now.
Yuvi Panda commented
@consideRatio turns out this is simpler than I thought :) Here's a (mostly docs) PR #41