Meteor's own accounts packages - accounts-google, accounts-github,
accounts-facebook, accounts-twitter, accounts-meteor-developer,
accounts-weibo, accounts-meetup and accounts-passwordless - are added, so
every way to log in that Meteor's accounts system offers is available.
models/lib/oauthProviders.js is the pure catalog of the seven providers
(env var names, ServiceConfiguration id field, login method, icon, label
key) with the decisions built on it: OAUTH_<PROVIDER>_ENABLED plus id and
secret (each also read from a <NAME>_FILE Docker secret), the Admin Panel
override winning over the env var, OAUTH_PROVIDERS_LOGIN_STYLE,
OAUTH_PROVIDERS_MERGE_EXISTING_USERS and PASSWORDLESS_ENABLED.
server/lib/oauthProviders.js writes ServiceConfiguration for every enabled
provider at startup and on demand (reconfigureOauthProviders, called by the
Admin Panel after a save) and removes it for a disabled one, so switching a
provider off takes effect without a restart. A first login through a
provider becomes a WeKan user the way OIDC does, fail-closed: an existing
account of another login method is only linked when merging is on and the
provider verified the address, otherwise the login is refused and the
attempt recorded on the new oauth.account-conflict canary for Admin Panel
-> Problems. Passwordless is gated on both the token-request method and
the login attempt while it is off.
getAuthenticationsEnabled reports each enabled provider key and
passwordless, and the login form shows one button per provider and a
two-step e-mailed-code form under the SAML button, with errors in the same
region as the password form. No credential ever reaches the client.
tests/oauthProviders.test.cjs covers the catalog, the env/_FILE/admin
resolution, the enabled and takeover decisions, the ServiceConfiguration
upsert/remove, the canary, the login form and the no-secret-on-the-client
negative checks.
Thanks to xet7 !