mirror of
https://github.com/discourse/discourse.git
synced 2026-08-11 02:59:07 +08:00
Previously, signing up required picking a username and password and confirming through an activation email, even on sites that only want a minimal email-based signup. This change builds on the email code login flow so that, when `enable_local_logins_via_code` is enabled, new users can sign up with just an email address and a one-time code: they enter an email, confirm the code, fill in any required signup fields, and land on an account-ready step where they pick a username and avatar for their new passwordless account. Account creation only happens after the code proves ownership of the inbox, and it respects `allow_new_registrations`, `invite_only`, `require_invite_code`, `must_approve_users`, and screened/blocked email rules. Requires changes from #40804 https://github.com/user-attachments/assets/2969db68-af55-4d5e-9587-37262776632f <details> <summary>Screenshots</summary> **Desktop** | Step | Foundation · Light | Foundation · Dark | Horizon · Light | Horizon · Dark | |---|---|---|---|---| | Email entry | <img width="1400" height="1200" alt="desktop-foundation-light-code-signup-email-step" src="https://github.com/user-attachments/assets/db92c4a2-9f90-4f61-9c32-5d2be3e7f211" /> | <img width="1400" height="1200" alt="desktop-foundation-dark-code-signup-email-step" src="https://github.com/user-attachments/assets/72a5a416-cabd-4958-99da-1b766db0eceb" /> | <img width="1400" height="1200" alt="desktop-horizon-light-code-signup-email-step" src="https://github.com/user-attachments/assets/2bed0aa0-3883-45cb-959f-73b1ace9628b" /> | <img width="1400" height="1200" alt="desktop-horizon-dark-code-signup-email-step" src="https://github.com/user-attachments/assets/ad2269a0-2bc8-4a6d-9dc7-e1462aab0596" /> | | Code entry | <img width="1400" height="1200" alt="desktop-foundation-light-code-signup-code-step" src="https://github.com/user-attachments/assets/3b651100-a788-4562-9dd5-92f15a86eaef" /> | <img width="1400" height="1200" alt="desktop-foundation-dark-code-signup-code-step" src="https://github.com/user-attachments/assets/db13d098-e7d1-4d4f-a0c5-deb201a5f909" /> | <img width="1400" height="1200" alt="desktop-horizon-light-code-signup-code-step" src="https://github.com/user-attachments/assets/37f9f251-d0ed-4665-8f53-25224b11e026" /> | <img width="1400" height="1200" alt="desktop-horizon-dark-code-signup-code-step" src="https://github.com/user-attachments/assets/362e273b-d524-480b-9b07-5fe95fcb16d4" /> | | Required fields | <img width="1400" height="1200" alt="desktop-foundation-light-code-signup-user-fields-step" src="https://github.com/user-attachments/assets/f81cc094-fef2-4c45-8b09-759f64bafd36" /> | <img width="1400" height="1200" alt="desktop-foundation-dark-code-signup-user-fields-step" src="https://github.com/user-attachments/assets/8aec56a1-80cd-4179-b071-bf8faf55d591" /> | <img width="1400" height="1200" alt="desktop-horizon-light-code-signup-user-fields-step" src="https://github.com/user-attachments/assets/ce7e6f13-b684-49b6-98b2-e1481fdfb43c" /> | <img width="1400" height="1200" alt="desktop-horizon-dark-code-signup-user-fields-step" src="https://github.com/user-attachments/assets/b253e9d9-0d7d-4482-93b6-fdbb767762d9" /> | | Account ready | <img width="1400" height="1200" alt="desktop-foundation-light-code-signup-complete-step" src="https://github.com/user-attachments/assets/7282a6a5-ddce-45fb-ac18-4f9eecc45fce" /> | <img width="1400" height="1200" alt="desktop-foundation-dark-code-signup-complete-step" src="https://github.com/user-attachments/assets/bf573b5f-e431-4c6d-8616-ed4df1324488" /> | <img width="1400" height="1200" alt="desktop-horizon-light-code-signup-complete-step" src="https://github.com/user-attachments/assets/114cc19d-1f90-4a26-be5c-ce28637ae852" /> | <img width="1400" height="1200" alt="desktop-horizon-dark-code-signup-complete-step" src="https://github.com/user-attachments/assets/1494835e-4ecf-4fd1-acc8-1816167917f1" /> | **Mobile** | Step | Foundation · Light | Foundation · Dark | Horizon · Light | Horizon · Dark | |---|---|---|---|---| | Email entry | <img width="1170" height="3600" alt="mobile-foundation-light-code-signup-email-step" src="https://github.com/user-attachments/assets/10d77db9-b83f-4e26-85e8-0fad4bb37812" /> | <img width="1170" height="3600" alt="mobile-foundation-dark-code-signup-email-step" src="https://github.com/user-attachments/assets/73225116-0d69-4c58-9a58-17803e9685be" /> | <img width="1170" height="3600" alt="mobile-horizon-light-code-signup-email-step" src="https://github.com/user-attachments/assets/8654ffcc-9694-4364-97b3-eb867ffb3ef6" /> | <img width="1170" height="3600" alt="mobile-horizon-dark-code-signup-email-step" src="https://github.com/user-attachments/assets/c6254023-d711-4d09-b010-d0662aeafdbf" /> | | Code entry | <img width="1170" height="3600" alt="mobile-foundation-light-code-signup-code-step" src="https://github.com/user-attachments/assets/b2603114-a2b8-4d12-9343-ce6626fbca16" /> | <img width="1170" height="3600" alt="mobile-foundation-dark-code-signup-code-step" src="https://github.com/user-attachments/assets/cefd4e19-460d-4149-916b-d007cdcf0ae3" /> | <img width="1170" height="3600" alt="mobile-horizon-light-code-signup-code-step" src="https://github.com/user-attachments/assets/eeba6cbf-edc7-4ab9-b90f-cf77cefc788b" /> | <img width="1170" height="3600" alt="mobile-horizon-dark-code-signup-code-step" src="https://github.com/user-attachments/assets/739de191-8363-4de2-9f1e-4afd41acbafd" /> | | Required fields | <img width="1170" height="3600" alt="mobile-foundation-light-code-signup-user-fields-step" src="https://github.com/user-attachments/assets/4f2697aa-9df0-4dc9-9cf9-012f5a8cc15c" /> | <img width="1170" height="3600" alt="mobile-foundation-dark-code-signup-user-fields-step" src="https://github.com/user-attachments/assets/e9ba5131-89dc-432e-a96d-4c4bf7f98b4f" /> | <img width="1170" height="3600" alt="mobile-horizon-light-code-signup-user-fields-step" src="https://github.com/user-attachments/assets/de39ae14-b076-4096-bbed-11f0a98f9dfd" /> | <img width="1170" height="3600" alt="mobile-horizon-dark-code-signup-user-fields-step" src="https://github.com/user-attachments/assets/58ee1450-2b01-47cd-8d49-6eebc6fd60a1" /> | | Account ready | <img width="1170" height="3600" alt="mobile-foundation-light-code-signup-complete-step" src="https://github.com/user-attachments/assets/08598aad-cb5a-4f4c-bf18-c911504dc55c" /> | <img width="1170" height="3600" alt="mobile-foundation-dark-code-signup-complete-step" src="https://github.com/user-attachments/assets/b78b39aa-a7c7-435a-baab-f5d21c4dbada" /> | <img width="1170" height="3600" alt="mobile-horizon-light-code-signup-complete-step" src="https://github.com/user-attachments/assets/86d01a27-a49b-4d3a-81cc-2b25fb13b7d9" /> | <img width="1170" height="3600" alt="mobile-horizon-dark-code-signup-complete-step" src="https://github.com/user-attachments/assets/f3935eae-fda5-42f7-9c9e-7e0d5b13b6b8" /> | </details> |
||
|---|---|---|
| .. | ||
| admin/search | ||
| admin_notices | ||
| categories | ||
| category | ||
| discourse_id | ||
| email_login_code | ||
| flags | ||
| groups | ||
| nested_topic | ||
| notification/action | ||
| notifications | ||
| problem_check | ||
| site_setting | ||
| tags | ||
| themes | ||
| upcoming_changes | ||
| user | ||
| user_api_key | ||
| video_conversion | ||
| admin_dashboard_engagement_spec.rb | ||
| admin_dashboard_highlights_spec.rb | ||
| admin_dashboard_search_spec.rb | ||
| admin_dashboard_section_configuration_spec.rb | ||
| admin_dashboard_section_loader_spec.rb | ||
| admin_dashboard_site_traffic_spec.rb | ||
| anonymous_shadow_creator_spec.rb | ||
| auto_silence_spec.rb | ||
| badge_granter_spec.rb | ||
| base_bookmarkable_spec.rb | ||
| category_hashtag_data_source_spec.rb | ||
| color_scheme_revisor_spec.rb | ||
| destroy_task_spec.rb | ||
| email_settings_exception_handler_spec.rb | ||
| email_settings_validator_spec.rb | ||
| email_style_updater_spec.rb | ||
| external_upload_manager_spec.rb | ||
| flag_sockpuppets_spec.rb | ||
| group_action_logger_spec.rb | ||
| group_mentions_updater_spec.rb | ||
| group_message_spec.rb | ||
| hashtag_autocomplete_service_spec.rb | ||
| heat_settings_updater_spec.rb | ||
| hub_push_notification_pusher_spec.rb | ||
| inline_uploads_multisite_spec.rb | ||
| inline_uploads_spec.rb | ||
| locale_normalizer_spec.rb | ||
| notification_emailer_spec.rb | ||
| post_action_notifier_spec.rb | ||
| post_alerter_spec.rb | ||
| post_bookmarkable_spec.rb | ||
| post_owner_changer_spec.rb | ||
| problem_check_spec.rb | ||
| push_notification_pusher_spec.rb | ||
| random_topic_selector_spec.rb | ||
| search_indexer_spec.rb | ||
| sidebar_site_settings_backfiller_spec.rb | ||
| site_settings_spec.rb | ||
| staff_action_logger_spec.rb | ||
| tag_hashtag_data_source_spec.rb | ||
| tag_settings_updater_spec.rb | ||
| theme_settings_migrations_runner_spec.rb | ||
| themes_spec.rb | ||
| topic_bookmarkable_spec.rb | ||
| topic_status_updater_spec.rb | ||
| topic_timestamp_changer_spec.rb | ||
| trust_level_granter_spec.rb | ||
| user_activator_spec.rb | ||
| user_anonymizer_spec.rb | ||
| user_authenticator_spec.rb | ||
| user_destroyer_spec.rb | ||
| user_merger_spec.rb | ||
| user_notification_schedule_processor_spec.rb | ||
| user_password_expirer_spec.rb | ||
| user_silencer_spec.rb | ||
| user_stat_count_updater_spec.rb | ||
| user_suspender_spec.rb | ||
| user_updater_spec.rb | ||
| username_changer_spec.rb | ||
| username_checker_service_spec.rb | ||
| wildcard_domain_checker_spec.rb | ||
| wildcard_url_checker_spec.rb | ||
| word_watcher_spec.rb | ||