The same claim is used to map both the user id and the username, this claim is configured through the OIDC_UID_FIELD
environment variable.
Ideally there should be two different environment vars, and the user id by default should be mapped to sub
.
The username is hard coded to preferred_username
.
Instead of showing the actual Sign-Up form only show a "Continue with Hellō" button that starts the OpenID Connect authorization request.
The request starts at /auth/auth/openid_connect
and it must be a POST request.
By default auto-loading is disabled. For code changes to be reloaded you have to drop into rails console and run
reload!
.
Everything under app/*
is now set for auto-load.
In rails console you can check the auto-reload status with:
Rails.application.config.autoload_paths
Looking up an user is mixed in with creating the User and associated Identity. Make the user creation explicit, so we can take a different action on user creation versus user sign-in.
Redirect only on user creation.
No link to /auth/sign_in
with username and password form and OIDC button, directly render button that initiates
"Sign in with Hello".
Username and password form still accessible at /auth/sign_in
.
Added button labelled "Mastodon Builder" with link to https://wallet.hello.coop/mastodon at the top of the profile page.
This removes the email and password editing functionality.
Should revisit for a more nuanced approach, should probably enable for admin account(s) and/or accounts that do have a password set.
The method to revisit is use_seamless_external_login?
. Currently this method returns true
only for PAM and LDAP
authentication, disconnected from the similar omniauth_only?
Overriding the omniauth_only?
methods (or setting the OMNIAUTH_ONLY
env var) also disables registration, and while
the registration flow uses OpenID Connect it does rely on showing the server rules which is part of the registration
flow. So the patch is done performed only in the view.
Also:
- hide "Login with" if username and password form not available
- change "or Login with" to "or"
- change the login button label to "Login with Hellō"
Visiting /settings/otp_authentication
still works.
Log analytics requests
Add Hellō version and issuer to the output of the /nodeinfo/2.0
endpoint.
On the "Edit profile" page (/settings/profile
) move the Bio (aka Note) below the account card (header, avatar & username card)