Discourse communities can now let users log in using a short emailed code instead of a magic link, offering a passwordless login flow which feels familiar to many other SaaS platforms and works alongside your existing second-factor setup.
In this topic, we’ll review the major changes and share how you can start using this today.
What’s changed
When this feature is enabled, members see a simpler flow:
- They enter an email address and click Continue.
- A six-digit code lands in their inbox. They paste it (or type it) and the form auto-submits when the last digit is filled.
- If they have second-factor authentication enabled (TOTP, backup codes, or security key), the standard 2FA step appears next.
A few details worth knowing: codes are valid for 10 minutes, expire after 5 failed attempts, and can only be redeemed once.
Turning on one-time login codes in your community
For now, this is considered an experimental change! Before rolling it out more widely, we’re welcoming your feedback to help us make improvements.
To turn this on, head to the Upcoming changes page in your admin area (/admin/config/upcoming-changes) and find the Enable local logins via code item. Update the Enabled for… field to opt your site in to this new design:
Before enabling, confirm that both enable_local_logins and enable_local_logins_via_email are also true as the feature cannot be turned on without them. If you’re using DiscourseConnect (enable_discourse_connect), this feature cannot be enabled.
Once the change is enabled, the code login path appears automatically.
Random usernames for new accounts
New members who sign up without a recognisable username in their email are now given a friendly generated name like “QuietFalcon42” instead of a generic placeholder like user1. The account-ready step prefills the suggestion and includes a dice button to roll a new one.
The word lists behind the suggestions are configurable via the random_username_adjectives and random_username_nouns site settings, so communities can tune them to their tone or language. To opt out and keep the old numbered fallback, disable enable_random_usernames.
What do you think?
Over to you: we’d love to hear what you think of this new feature. What do you like and dislike; what is working well, and what could be improved?







