mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2026-03-13 07:49:55 +08:00
Automated deployment: Wed Jan 27 13:51:17 UTC 2021 709f399883
This commit is contained in:
@@ -834,7 +834,7 @@
|
||||
<span class="p">)</span>
|
||||
</code></pre></div>
|
||||
<h3 id="optional-user-verification">Optional: user verification<a class="headerlink" href="#optional-user-verification" title="Permanent link">¶</a></h3>
|
||||
<p>You can require the user to be <strong>verified</strong> (i.e. <code>is_verified</code> property set to <code>True</code>) to allow login. You have to set the <code>requires_validation</code> parameter to <code>True</code> on the router instantiation method:</p>
|
||||
<p>You can require the user to be <strong>verified</strong> (i.e. <code>is_verified</code> property set to <code>True</code>) to allow login. You have to set the <code>requires_verification</code> parameter to <code>True</code> on the router instantiation method:</p>
|
||||
<div class="highlight"><pre><span></span><code><span class="n">app</span><span class="o">.</span><span class="n">include_router</span><span class="p">(</span>
|
||||
<span class="n">fastapi_users</span><span class="o">.</span><span class="n">get_auth_router</span><span class="p">(</span><span class="n">jwt_authentication</span><span class="p">,</span> <span class="n">requires_verification</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span>
|
||||
<span class="n">prefix</span><span class="o">=</span><span class="s2">"/auth/jwt"</span><span class="p">,</span>
|
||||
|
||||
Reference in New Issue
Block a user