<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Login on WeTalk Blog</title><link>https://blog00.jjj123.com/tags/login/</link><description>Recent content in Login on WeTalk Blog</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Thu, 10 Apr 2025 03:43:00 +0000</lastBuildDate><atom:link href="https://blog00.jjj123.com/tags/login/index.xml" rel="self" type="application/rss+xml"/><item><title>Piece 2: Signup System(Login 3)</title><link>https://blog00.jjj123.com/post/2025/04/20250409_234432/</link><pubDate>Thu, 10 Apr 2025 03:43:00 +0000</pubDate><guid>https://blog00.jjj123.com/post/2025/04/20250409_234432/</guid><description>&lt;h3 id="piece-2-signup-systemlogin-3">Piece 2: Signup System(Login 3)&lt;/h3>
&lt;p>&lt;a href="https://github.com/PrivLocking/signup_daemon">Link : github source code&lt;/a>&lt;/p>
&lt;h4 id="components">Components&lt;/h4>
&lt;ul>
&lt;li>&lt;strong>HAProxy&lt;/strong>: Acts as the reverse proxy, listening on &amp;ldquo;/signup&amp;rdquo; and forwarding requests to the .c2 backend.&lt;/li>
&lt;li>&lt;strong>.c2 Backend&lt;/strong>: A separate C-based backend (distinct from the .c login backend) handling signup logic.&lt;/li>
&lt;li>&lt;strong>Redis&lt;/strong>: Stores signup tracking (select 5) and user data (select 0).&lt;/li>
&lt;/ul>
&lt;h4 id="target">Target&lt;/h4>
&lt;ul>
&lt;li>Allow users to self-sign up for an account with privacy as the highest priority, assigning them level 0 and a 30-day TTL, while preventing bot abuse and ensuring unique usernames.&lt;/li>
&lt;/ul>
&lt;h4 id="requirements-your-inputs">Requirements (Your Inputs)&lt;/h4>
&lt;ol>
&lt;li>&lt;strong>Endpoint&lt;/strong>: HAProxy listens on &amp;ldquo;/signup&amp;rdquo;, accessible to anyone for self-signup.&lt;/li>
&lt;li>&lt;strong>Backend&lt;/strong>: Requests are redirected to .c2 (you labeled it .c2 to distinguish it from the login .c backend).&lt;/li>
&lt;li>&lt;strong>IP Limiting&lt;/strong>: Track &lt;code>user/ip&lt;/code> in Redis &amp;ldquo;select 5&amp;rdquo; with a TTL of 3600s. If an IP has successfully signed up within 3600s, redirect to an HTML page saying &amp;ldquo;Your IP has already registered. Multi-register is not allowed.&amp;rdquo;&lt;/li>
&lt;li>&lt;strong>Username Rules&lt;/strong>: Allow signup if the username:
&lt;ul>
&lt;li>Starts with a-zA-Z.&lt;/li>
&lt;li>Contains only a-zA-Z0-9.&lt;/li>
&lt;li>Is more than 8 characters.&lt;/li>
&lt;li>Doesn’t already exist.&lt;/li>
&lt;li>Return a generic &amp;ldquo;signup failed&amp;rdquo; error for any failure (no specific reasons like &amp;ldquo;username exists&amp;rdquo;).&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;strong>New User Settings&lt;/strong>: Set TTL to 30 days and level to 0 (no extra privileges).&lt;/li>
&lt;li>&lt;strong>Storage&lt;/strong>: Save new users to &amp;ldquo;select 0&amp;rdquo; (you confirmed this as the user database).&lt;/li>
&lt;li>&lt;strong>Privacy&lt;/strong>: No email or phone verification—users re-sign up if they lose passwords.&lt;/li>
&lt;li>&lt;strong>Atomicity&lt;/strong>: Lock username insertion to prevent simultaneous duplicates (you agreed it’s unlikely but worth doing).&lt;/li>
&lt;li>&lt;strong>IP Blocking Logic&lt;/strong>: 1 signup per IP in 3600s isn’t strict—users should wait if they need another account.&lt;/li>
&lt;li>&lt;strong>CAPTCHA&lt;/strong>: No Google CAPTCHA; add a self-hosted CAPTCHA replacement for bot protection (you requested this for signup, login, and admin).&lt;/li>
&lt;li>&lt;strong>TTL Expiry&lt;/strong>: If a new user’s TTL (30 days) expires, delete the account completely, allowing username reuse.&lt;/li>
&lt;li>&lt;strong>Username as Key&lt;/strong>: Use &lt;code>username&lt;/code> as the key in Redis (e.g., for GET/SET or HGET/HSET).&lt;/li>
&lt;/ol>
&lt;h4 id="conceptual-solutions-my-suggestions-integrated-with-your-decisions">Conceptual Solutions (My Suggestions Integrated with Your Decisions)&lt;/h4>
&lt;ol>
&lt;li>
&lt;p>&lt;strong>Flow&lt;/strong>:&lt;/p></description></item></channel></rss>