{"result":{"depiction_url":null,"edges":{"in_module":{"objects":[{"created":"2026-09-30T09:18:26Z","object_id":{"id":1306,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_authentication","title":"mod_authentication","uri":"https:\/\/zotonic.com\/id\/1306"},"seq":1}],"predicate":{"id":333,"is_a":["meta","predicate"],"name":"in_module","title":{"_type":"trans","tr":{"en":"In module"}},"uri":"https:\/\/zotonic.com\/id\/in_module"}},"refers":{"objects":[{"created":"2026-09-30T09:32:49Z","object_id":{"id":2754,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_zotonic_cotonic_model_auth","title":"model\/auth","uri":"https:\/\/zotonic.com\/id\/2754"},"seq":1000000}],"predicate":{"id":2409,"is_a":["meta","predicate"],"name":"refers","title":{"_type":"trans","tr":{"en":"Refers"}},"uri":"https:\/\/zotonic.com\/id\/refers"}},"subject":{"objects":[{"created":"2026-09-30T09:18:26Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-30T09:18:26Z","object_id":{"id":2563,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_frontend_developer","title":"Frontend developer","uri":"https:\/\/zotonic.com\/id\/2563"},"seq":2},{"created":"2026-09-30T09:18:26Z","object_id":{"id":2583,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_user_interface_and_interaction","title":"User interface and interaction","uri":"https:\/\/zotonic.com\/id\/2583"},"seq":3},{"created":"2026-09-30T09:18:26Z","object_id":{"id":2589,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_identity_and_accounts","title":"Identity and accounts","uri":"https:\/\/zotonic.com\/id\/2589"},"seq":4},{"created":"2026-09-30T09:18:26Z","object_id":{"id":2590,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_authentication","title":"Authentication","uri":"https:\/\/zotonic.com\/id\/2590"},"seq":5},{"created":"2026-09-30T09:18:26Z","object_id":{"id":2625,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_model","title":"Model","uri":"https:\/\/zotonic.com\/id\/2625"},"seq":6},{"created":"2026-09-30T09:18:26Z","object_id":{"id":2673,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_javascript","title":"JavaScript","uri":"https:\/\/zotonic.com\/id\/2673"},"seq":7},{"created":"2026-09-30T09:18:26Z","object_id":{"id":2718,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_cotonic","title":"Cotonic","uri":"https:\/\/zotonic.com\/id\/2718"},"seq":8}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":2753,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2753"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_zotonic_cotonic_model_auth_ui","page_url":{"en":"https:\/\/zotonic.com\/cotonic\/zotonic-models\/auth-ui","x-default":"https:\/\/zotonic.com\/cotonic\/zotonic-models\/auth-ui"},"preview_url":null,"resource":{"version":22,"pivot_location_lat":null,"title":"model\/auth-ui","is_authoritative":true,"body":"<h1>model\/auth-ui<\/h1>\n<p>Manages Zotonic&#39;s login, reminder, verification, reset, and password-change\nviews. The standard <code>_logon.tpl<\/code> starts the worker and supplies the\n<code>signup_logon_box<\/code> UI target. The worker renders <code>_logon_box.tpl<\/code> through the\nserver template model and reacts to <a href=\"\/id\/doc_zotonic_cotonic_model_auth\">authentication events<\/a>.<\/p>\n<h2>Commands<\/h2>\n<p>All topics below start with <code>model\/auth-ui\/<\/code>. Commands update the view or start\nan asynchronous flow; they do not reply to a response topic.<\/p>\n<table class=\"table\"><thead><tr><th>Topic suffix<\/th><th>Payload<\/th><\/tr><\/thead><tbody><tr><td><code>post\/view\/+view<\/code><\/td><td>Select the view named by the final topic segment, such as <code>logon<\/code> or <code>reminder<\/code>. Payload is ignored.<\/td><\/tr><tr><td><code>post\/form\/reminder<\/code><\/td><td>Form payload with <code>value.email<\/code>.<\/td><\/tr><tr><td><code>post\/form\/send_verification_message<\/code><\/td><td>Form payload with <code>value.token<\/code>.<\/td><\/tr><tr><td><code>post\/form\/reset<\/code><\/td><td>Form payload with <code>value.password_reset1<\/code>, <code>value.password_reset2<\/code>, and optional <code>value.passcode<\/code>, <code>value.rememberme<\/code>, <code>value[&quot;code-new&quot;]<\/code>, and <code>value.test_passcode<\/code>.<\/td><\/tr><tr><td><code>post\/form\/change<\/code><\/td><td>Form payload with <code>value.password<\/code>, <code>value.password_reset1<\/code>, <code>value.password_reset2<\/code>, and optional passcode fields. The current handler reads <code>code-new<\/code> from the outer payload.<\/td><\/tr><tr><td><code>post\/confirm-authuser<\/code><\/td><td>Object with <code>username<\/code> and <code>authuser<\/code> to enter account confirmation.<\/td><\/tr><\/tbody><\/table>\n<pre class=\"notranslate\"><code class=\"notranslate language-javascript\">cotonic.broker.publish(&quot;model\/auth-ui\/post\/view\/reminder&quot;, {});\n<\/code><\/pre>\n<p>For example, a reminder request can be sent with:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-javascript\">cotonic.broker.publish(&quot;model\/auth-ui\/post\/form\/reminder&quot;, {\n    value: { email: &quot;reader@example.com&quot; }\n});\n<\/code><\/pre>\n<h2>State and results<\/h2>\n<p>The initial view comes from the location query&#39;s <code>logon_view<\/code>, defaulting to\n<code>logon<\/code>. Query arguments <code>secret<\/code>, <code>u<\/code>, and <code>email<\/code> supply reset and login context.\nThe worker checks repeated passwords before submitting reset or change commands\nto <a href=\"\/id\/doc_zotonic_cotonic_model_auth\" class=\"doc-reference doc-reference-cotonic\"><code>cotonic#auth<\/code><\/a>.<\/p>\n<p>Authentication errors, user changes, and password-change results are consumed\nfrom <code>model\/auth\/event\/auth-error<\/code>, <code>model\/auth\/event\/auth-user-id<\/code>, and\n<code>model\/auth\/event\/auth-change-result<\/code>. Results appear in the rendered login\nbox; there is no separate <code>model\/auth-ui\/event\/...<\/code> stream.<\/p>\n<h2>Implementation<\/h2>\n<p><a href=\"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_mod_authentication\/priv\/lib\/js\/zotonic.auth-ui.worker.js\">JavaScript source<\/a>.<\/p>","slug":"model-auth-ui","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"7f84e83733d278e39da567bf2b358e65f23b144858669705e65a4590658b5207","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":2723,"is_a":["meta","category"],"name":"cotonic_model","title":"Cotonic models","uri":"https:\/\/zotonic.com\/id\/cotonic_model"},"doc_source_path":"doc\/cotonic-models\/auth-ui.md","publication_start":"2026-09-30T09:18:26Z","page_path":"\/cotonic\/zotonic-models\/auth-ui","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/doc\/cotonic-models\/auth-ui.md","pivot_location_lng":null,"doc_source_kind":"cotonic_model","name":"doc_zotonic_cotonic_model_auth_ui","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2026-09-30T09:18:26Z","uri":null,"doc_status":"current","is_dependent":false,"publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"b8c4b2ccdc223257f311968fbd17b2d66f0c4156\n","creator_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"modified":"2026-09-30T09:40:08Z","title_slug":"model-auth-ui"},"uri":"https:\/\/zotonic.com\/id\/2753","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2753"}},"status":"ok"}