<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="121014" data-post-id="121014">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="danschultzer" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/danschultzer/120/4942_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  danschultzer
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Pow Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>You only have to assign the user in e.g. the setup callback:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">Pow.Plug.assign_current_user(conn, user, otp_app: :my_app)
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="121014" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/pow-robust-modular-extendable-user-authentication-and-management-system/15807/73">Post #72</a>
	                </div>
	            </div>
              <div id="likers-container-121014" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="121014"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #72"></div>
  </section>
</div>
    <div class="postbit" id="121420" data-post-id="121420">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Kurisu" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Kurisu/120/14820_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Kurisu
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="danschultzer" data-post="60" data-topic="15807">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/danschultzer/48/4942_2.png" class="avatar"> danschultzer:</div>
<blockquote>
<p>I’ve created a quick PR for a guide on this: <a href="https://github.com/danschultzer/pow/blob/locked-users/guides/LOCK_USERS.md" rel="noopener nofollow ugc">https://github.com/danschultzer/pow/blob/locked-users/guides/LOCK_USERS.md </a></p>
<p><a class="mention" href="/u/kurisu" rel="nofollow">@Kurisu</a> and <a class="mention" href="/u/dimitarvp" rel="nofollow">@dimitarvp</a> (and anybody who’s interested in this) - comments would be super helpful!</p>
</blockquote>
</aside>
<p>I encountered a slight issue when following the guide, sorry for the late report.<br>
Please see all the details in the comment I just made on your commit <a href="https://github.com/danschultzer/pow/commit/009bc7b8d9e6be515a421c3a14478b36381ce772#diff-cba6c6afbfb62fbbdc991dbceef22f0b" rel="noopener nofollow ugc">here</a>.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="121420" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/pow-robust-modular-extendable-user-authentication-and-management-system/15807/74">Post #73</a>
	                </div>
	            </div>
              <div id="likers-container-121420" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="121420"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #73"></div>
  </section>
</div>
    <div class="postbit" id="121731" data-post-id="121731">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Kurisu" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Kurisu/120/14820_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Kurisu
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/danschultzer" rel="nofollow">@danschultzer</a> It is me again. <img src="https://forum.elixirforum.com/images/emoji/apple/sweat_smile.png?v=15" title=":sweat_smile:" class="emoji" alt=":sweat_smile:" loading="lazy" width="20" height="20"></p>
<p>While the <code>lock_users</code> guide works fine, I found that the default <code>session_controller</code> won’t use the <code>EnsureNotLockedUser</code> plug when creating a new session.<br>
Well, it is true that adding the guide plug before any route of the app will do the job, but do you recommend using it like that ?</p>
<p>Anyway I’m trying to use a custom session_controller but I find the process a bit complex…<br>
Here is all I’ve read in the docs about it:</p>
<blockquote>
<p>The registration and session controllers can be changed with your customized versions too, but since the routes are built on compile time, you’ll have to set them up in  <code>router.ex</code>  with  <code>:pow</code>  namespace. For minor pre/post-processing of requests, you can use the  <code>:controller_callbacks</code>  option. It exists to make it easier to modify flow with extensions (e.g., send a confirmation email upon user registration).</p>
</blockquote>
<p>So I have a few questions.</p>
<ul>
<li>For custom controllers, is there a way to use the coresponding default controller view and templates?</li>
<li>Is just setting up custom controllers in <code>router.ex</code> with <code>:pow</code> namespace will be sufficient for all to work? (I seem to get some errors about view module not found…)</li>
<li>Is using some custom controller, means that we have to update configuration with <code>routes_backend: MyAppWeb.Pow.Routes</code>?</li>
<li>Will it be possible to make for noobs some quick guide on a very basic custom controller ? <img src="https://forum.elixirforum.com/images/emoji/apple/blush.png?v=15" title=":blush:" class="emoji" alt=":blush:" loading="lazy" width="20" height="20"></li>
</ul>
<p>Thank you for your work and your time. ^^</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="121731" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/pow-robust-modular-extendable-user-authentication-and-management-system/15807/75">Post #74</a>
	                </div>
	            </div>
              <div id="likers-container-121731" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="121731"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #74"></div>
  </section>
</div>
    <div class="postbit" id="121738" data-post-id="121738">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="danschultzer" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/danschultzer/120/4942_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  danschultzer
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Pow Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Kurisu" data-post="75" data-topic="15807">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kurisu/48/14820_2.png" class="avatar"> Kurisu:</div>
<blockquote>
<p>Well, it is true that adding the guide plug before any route of the app will do the job, but do you recommend using it like that ?</p>
</blockquote>
</aside>
<p>I recommend doing that. Add it before the session routes, or add it to  <code>endpoint.ex</code> (after the pow session plug).</p>
<aside class="quote no-group" data-username="Kurisu" data-post="75" data-topic="15807">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kurisu/48/14820_2.png" class="avatar"> Kurisu:</div>
<blockquote>
<ul>
<li>For custom controllers, is there a way to use the coresponding default controller view and templates?</li>
<li>Is just setting up custom controllers in <code>router.ex</code> with <code>:pow</code> namespace will be sufficient for all to work? (I seem to get some errors about view module not found…)</li>
<li>Is using some custom controller, means that we have to update configuration with <code>routes_backend: MyAppWeb.Pow.Routes</code> ?</li>
<li>Will it be possible to make for noobs some quick guide on a very basic custom controller ? <img src="https://forum.elixirforum.com/images/emoji/apple/blush.png?v=15" title=":blush:" class="emoji" alt=":blush:" loading="lazy" width="20" height="20"></li>
</ul>
</blockquote>
</aside>
<p>Here’s the custom controllers guide: <a href="https://github.com/danschultzer/pow/blob/master/guides/CUSTOM_CONTROLLERS.md" rel="noopener nofollow ugc">https://github.com/danschultzer/pow/blob/master/guides/CUSTOM_CONTROLLERS.md</a></p>
<p>The ideal setup is that you take full control of the flow rather than depending on Pow. Trying to hack <code>Pow.Phoenix</code> will become pretty complicated and obfuscate what actually goes on. I recommend just using the <code>Pow.Plug</code> methods/modules instead. This way you’ll keep your code explicit and easy to understand. You won’t need the routes backend, or ensure router namespace, etc.</p>
<p>However, the controller callbacks can be used as an alternative if it’s only some light changes in the flow. It depends. What is it you want to change?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="121738" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/pow-robust-modular-extendable-user-authentication-and-management-system/15807/76">Post #75</a>
	                </div>
	            </div>
              <div id="likers-container-121738" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="121738"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #75"></div>
  </section>
</div>
    <div class="postbit" id="121739" data-post-id="121739">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Kurisu" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Kurisu/120/14820_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Kurisu
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="danschultzer" data-post="76" data-topic="15807">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/danschultzer/48/4942_2.png" class="avatar"> danschultzer:</div>
<blockquote>
<p>However, the controller callbacks can be used as an alternative if it’s only some light changes in the flow. It depends. What is it you want to change?</p>
</blockquote>
</aside>
<p>I was thinking about a way to prevent users from receiving password reset link if their account is locked. Since in this case they won’t be authenticated (they will only provide an email), the <code>EnsureNotLockedUser</code> plug won’t work here, right ?<br>
So I will have to change a bit the reset_password extension controller.</p>
<aside class="quote no-group" data-username="danschultzer" data-post="76" data-topic="15807">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/danschultzer/48/4942_2.png" class="avatar"> danschultzer:</div>
<blockquote>
<p>Here’s the custom controllers guide: <a href="https://github.com/danschultzer/pow/blob/master/guides/CUSTOM_CONTROLLERS.md" rel="noopener nofollow ugc">https://github.com/danschultzer/pow/blob/master/guides/CUSTOM_CONTROLLERS.md</a></p>
</blockquote>
</aside>
<p>Thank you, I will take a look at the guide. I didn’t notice it before. ^^</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="121739" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/pow-robust-modular-extendable-user-authentication-and-management-system/15807/77">Post #76</a>
	                </div>
	            </div>
              <div id="likers-container-121739" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="121739"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #76"></div>
  </section>
</div>
    <div class="postbit" id="121742" data-post-id="121742">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="danschultzer" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/danschultzer/120/4942_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  danschultzer
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Pow Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Kurisu" data-post="77" data-topic="15807">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kurisu/48/14820_2.png" class="avatar"> Kurisu:</div>
<blockquote>
<p>I was thinking about a way to prevent users from receiving password reset link if their account is locked. Since in this case they won’t be authenticated (they will only provide an email), the <code>EnsureNotLockedUser</code> plug won’t work here, right ?</p>
</blockquote>
</aside>
<p>Good call! You are right, the plug will only work when users have authenticated. I’ll update the guide with a section on this. This can be handled with a custom controller callback, but I’ll think it through and see if there’s a more explicit way of handling it.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="121742" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/pow-robust-modular-extendable-user-authentication-and-management-system/15807/78">Post #77</a>
	                </div>
	            </div>
              <div id="likers-container-121742" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="121742"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #77"></div>
  </section>
</div>
    <div class="postbit" id="121932" data-post-id="121932">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Jer7" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Jer7
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>This library is great. Even noob me managed to get it up and working on my project with little trouble. I do have a dumb question though.<br>
I am trying to change the user_id_field from :email to a custom field in the DB (:staffid) I have the schema and everything set up properly and I can access the data from that field through the Pow.Plug. I keep seeing in the readme that the user_id_field can be changed in the config, I just can’t figure out where exactly to do that.<br>
Any help would be very much appreciated!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="121932" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/pow-robust-modular-extendable-user-authentication-and-management-system/15807/79">Post #78</a>
	                </div>
	            </div>
              <div id="likers-container-121932" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="121932"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #78"></div>
  </section>
</div>
    <div class="postbit" id="121936" data-post-id="121936">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="danschultzer" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/danschultzer/120/4942_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  danschultzer
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Pow Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>That’s great!</p>
<p>You can set the <code>:user_id_field</code> in your user schema module as option to the <a href="https://hexdocs.pm/pow/Pow.Ecto.Schema.html" rel="noopener nofollow ugc"><code>use Pow.Ecto.Schema</code> macro</a>:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule MyApp.Users.User do
  use Ecto.Schema
  use Pow.Ecto.Schema,
    user_id_field: :staffid

  # ...
end
</code></pre>
<p>The <code>:staffid</code> column should have unique index in the db. Just to be clear since it sounds like an belongs to association field <img src="https://forum.elixirforum.com/images/emoji/apple/smile.png?v=15" title=":smile:" class="emoji" alt=":smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="121936" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/pow-robust-modular-extendable-user-authentication-and-management-system/15807/80">Post #79</a>
	                </div>
	            </div>
              <div id="likers-container-121936" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="121936"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #79"></div>
  </section>
</div>
    <div class="postbit" id="121992" data-post-id="121992">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Jer7" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Jer7
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="danschultzer" data-post="76" data-topic="15807">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/danschultzer/48/4942_2.png" class="avatar"> danschultzer:</div>
<blockquote>
<p>The ideal setup is that you take full control of the flow rather than depending on Pow. Trying to hack</p>
</blockquote>
</aside>
<p>Thank you for the super fast reply, it worked like a charm!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="121992" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/pow-robust-modular-extendable-user-authentication-and-management-system/15807/81">Post #80</a>
	                </div>
	            </div>
              <div id="likers-container-121992" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="121992"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #80"></div>
  </section>
</div>
    <div class="postbit" id="122128" data-post-id="122128">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Kurisu" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Kurisu/120/14820_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Kurisu
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’m just a bit curious. ^^<br>
Is it possible (or could it be) to pass a list of fields to <code>:user_id_field</code>, so that user can authenticate through the field of their choice?</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule MyApp.Users.User do
  use Ecto.Schema
  use Pow.Ecto.Schema,
    user_id_field: [:email, :pseudo, :phone]

  # ...
end
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="122128" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/pow-robust-modular-extendable-user-authentication-and-management-system/15807/82">Post #81</a>
	                </div>
	            </div>
              <div id="likers-container-122128" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="122128"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #81"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/15807/load_more?page=9">Load more posts (161 remaining)</a>
</div></template></turbo-stream>