Repository navigation
@emdash-cms/auth-atproto@0.2.53
Patch Changes
-
#5116
723784eThanks @ascorbic! - Fixes Atmosphere sign-in leaving records in the database that were never removed. An OAuth state now stops working 10 minutes after the sign-in starts, as intended, and scheduled cleanup deletes the states of sign-ins that were started and never finished. Before, every abandoned attempt left a row in_plugin_storagethat stayed there.Atmosphere sign-in also no longer stores the access and refresh tokens it receives from an account's provider. They were written for every completed callback, including accounts the site then refused, and never used again. Scheduled cleanup deletes the token sets stored by earlier versions.
The cleanup of existing rows needs
emdashupgraded, and the 10-minute state expiry and the end of token storage need@emdash-cms/auth-atprotoupgraded.Also fixes
/.well-known/atproto-client-metadata.jsonusing the host of the incoming request forclient_idandredirect_uris. It now usessiteUrl(orEMDASH_SITE_URL), the same origin the login route sends to the account's provider, so sign-in no longer fails behind reverse proxies that forward a differentHost. -
#5104
7ed8e09Thanks @ascorbic! - Fixes setup getting stuck when the first admin is created through GitHub, Google, Microsoft, or AT Protocol sign-in but linking the sign-in account fails partway through. Signing in again with the same account now finishes setup; any other account is still refused.canSelfSignup'screateUserfunction in@emdash-cms/authnow also receives the account being linked, ascreateUser(user, account), and may return an existing user forfindOrCreateOAuthUser()to link that account to. -
#5093
801bdacThanks @ascorbic! - Fixes sign-in keeping the session ID the browser already had. Signing in with a passkey, magic link, OAuth, Atmosphere, an invite, signup, first-admin setup or external authentication now starts the session under a new ID and removes the previous one from the session store. -
#5104
7ed8e09Thanks @ascorbic! - Fixes first-admin creation so only one person becomes admin when several first sign-ins happen at the same moment.- GitHub, Google, Microsoft, and AT Protocol sign-in during setup: the first sign-in becomes admin. A sign-in that finishes at the same time is now refused with
signup_not_allowedinstead of creating a second admin. With AT Protocol, only the account that becomes admin receives the email entered in the setup wizard, so another account can no longer be linked to the admin by that email. - Cloudflare Access: when several people sign in to a new site at once, one becomes admin and the others get the role from their Access groups.
While setup is still open, a sign-in from a new identity is refused once any user exists, matching the passkey setup step.
@emdash-cms/authadds an optionalcreateUser(user)function tocanSelfSignupresults. When present,findOrCreateOAuthUser()calls it instead ofadapter.createUser(). If it returnsnull, the sign-in is refused withsignup_not_allowed.@emdash-cms/auth-atprotonow requiresemdash1.7.0 or later. - GitHub, Google, Microsoft, and AT Protocol sign-in during setup: the first sign-in becomes admin. A sign-in that finishes at the same time is now refused with
-
Updated dependencies [
db3aa05,91dfa31,7ed8e09,7ed8e09]:- @emdash-cms/auth@1.7.0