OAUTH_GOOGLE_*, OAUTH_GITHUB_*, OAUTH_FACEBOOK_*, OAUTH_TWITTER_*, OAUTH_METEOR_DEVELOPER_*, OAUTH_WEIBO_*, OAUTH_MEETUP_*, OAUTH_PROVIDERS_LOGIN_STYLE, OAUTH_PROVIDERS_MERGE_EXISTING_USERS and PASSWORDLESS_ENABLED are now documented, commented out or defaulted, in every place the OAUTH2_* and SAML_* settings already are: docker-compose.yml and its FerretDB v1 / v2 and MongoDB variants, the Dockerfiles' ENV block, start-wekan.sh, start-wekan.bat, the Snap config (keys list plus DESCRIPTION_/DEFAULT_/KEY_ triples) and wekan-help, the Sandstorm package definition, the stacksmith Docker-secrets reader and secrets/README.md. The comments name the callback URL to register at each provider, <ROOT_URL>/_oauth/<service>, and say that Admin Panel / People / Login overrides the environment. New docs pages docs/Features/Login/OAuth-Providers.md and Passwordless.md, linked from the docs index. tests/oauthProvidersPlatformEnv.test.cjs pins that every variable is present on every platform and that the docs exist and are linked. Thanks to xet7 !
3.0 KiB
Passwordless login: a one-time code by email
Meteor's accounts-passwordless package lets a user sign in with a code that
WeKan emails them, instead of a password. WeKan wires it in behind one switch:
| Variable | Meaning |
|---|---|
PASSWORDLESS_ENABLED |
true adds "Sign in with a code sent by email" to the login page. Default false. |
It needs WeKan to be able to send email, so MAIL_URL (or the Admin Panel /
People / Email settings) must work first - test with a "forgot password"
email before enabling this. It can be overridden in Admin Panel / People /
Login, and a value set there wins over the environment variable.
browser WeKan mail server
| email address | |
|----------------------------->| 6-digit code, valid for a |
| | few minutes, sent to that |
| | address |
| |----------------------------->|
| user reads the code | |
| in their inbox | |
| types the code | |
|----------------------------->| code matches and is not |
| | expired: log in |
| logged in | |
|<-----------------------------| |
What it does and does not do
- An existing WeKan user with that email logs in as themselves; no password is asked and no password is set or changed.
- An unknown email creates a new user, subject to the registration rules in Admin Panel / People / Registration: with invite-only registration the code is not sent and the login is refused, exactly like a password sign-up.
- The code is single-use and short-lived. Asking for a new one invalidates the old one.
- The email is a login factor, so this is only as strong as the user's mailbox. It is a convenience for people who forget passwords, not a second factor; for that see Two-Factor Authentication.
- Brute-forcing the code is covered by the same Accounts Lockout that guards password logins.
Where it is configured
PASSWORDLESS_ENABLED is commented out, with the explanation above, in
docker-compose.yml (and the FerretDB / MongoDB variants), Dockerfile,
start-wekan.sh, start-wekan.bat, the Snap
(snap set wekan passwordless-enabled='true') and the Sandstorm package
definition.
To have only passwordless and the social providers, and no password form at
all, also set PASSWORD_LOGIN_ENABLED=false
(Disable Password Login).
Related
- OAuth Providers: Google, GitHub, Facebook, Twitter, Meteor Developer, Weibo, Meetup
- Forgot Password, which uses the same outgoing email