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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>From the admin invite only standpoint, why not just put the sign up page behind admin access requirements? If an admin fills in the details and email address then the user can get the registration link to continue the process from there.</p>
<p>That part should be pretty simple to solve regardless of solution.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="100565" 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/auth-framework-need-advice-based-on-a-list-of-prerequisites/17304/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-100565" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="100565"
                     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 #11"></div>
  </section>
</div>
    <div class="postbit" id="100622" data-post-id="100622">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dimitarvp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/120/38664_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dimitarvp
                    <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>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="brightball" data-post="12" data-topic="17304" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/brightball/48/17192_2.png" class="avatar"> brightball:</div>
<blockquote>
<p>From the admin invite only standpoint, why not just put the sign up page behind admin access requirements? If an admin fills in the details and email address then the user can get the registration link to continue the process from there.</p>
<p>That part should be pretty simple to solve regardless of solution.</p>
</blockquote>
</aside>
<p>Mostly because, as much as I worked with Elixir so far (soon 2 years), it hasn’t been with Phoenix at all. I was working on API gateways behind Guardian (and one of the customers already had a dedicated auth server). I also worked on various data crawlers and a lot of background tasks gated behind pools. So my exposure to this topic in Elixir land has been extremely limited. And when I found myself in a need of a quick solution, I have to fight an uphill battle to (a) inform myself of all the alternatives in a short time frame and (b) still work extra to custom-tailor them to my needs.</p>
<p>It’s hard to complain – at least there is a choice and all the libraries seem really well-made. But now I have to evaluate several other solutions with a time I don’t have (so I am using part of my otherwise free time). As much as I hate Rails, libraries like Devise can and do save time when you are building MVPs / prototypes / alpha versions.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="100622" 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/auth-framework-need-advice-based-on-a-list-of-prerequisites/17304/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-100622" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="100622"
                     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 #12"></div>
  </section>
</div>
    <div class="postbit" id="100623" data-post-id="100623">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dimitarvp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/120/38664_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dimitarvp
                    <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>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="smpallen99" data-post="9" data-topic="17304">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/smpallen99/48/1157_2.png" class="avatar"> smpallen99:</div>
<blockquote>
<p>I’m really interested in what you don’t like? Are you not using the standard web structure?</p>
</blockquote>
</aside>
<p>Things are moving too fast for me to give you a good breakdown (because half my complaints I don’t even remember now), but in a nutshell: I have to go my non-web and web app directories and execute commands there separately. My chief complaint was that I could do everything in <code>myapp</code> but when I wanted to get the generated controllers I had to go to <code>myapp_web</code>. And then they went into the wrong directory <code>myapp_web/lib/_web</code> for some reason (the generator didn’t detect the <code>myapp</code> part).</p>
<p>I would very much appreciate if community-made Phoenix generators – not only Coherence – allow the user to specify the app they want to inject the code into and to auto-detect the web app (scanning dependencies to look for <code>phoenix</code>, looking for <code>MyApp.Web</code> module, looking where <code>router.ex</code> is). It’s not a big deal per se but requires extra attention and it’s good that your mix tasks give proper informative output (kudos for that!) otherwise I’d be very quickly lost.</p>
<aside class="quote no-group" data-username="smpallen99" data-post="9" data-topic="17304">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/smpallen99/48/1157_2.png" class="avatar"> smpallen99:</div>
<blockquote>
<p>or calling the API to update the cache.</p>
</blockquote>
</aside>
<p>Do you mind repeating here on how I can do that? I looked at the docs and the way it was described there was the first thing I tried but it didn’t work for me. One of the things I also tried was fiddle with the functions in the <code>schemas.ex</code> – doing <code>Repo.preload</code> there worked immediately. I eventually settled for the generated controllers and overriding their private <code>current_user</code> function. I am looking at something as simple as updating the user and their attached <code>belongs_to</code> object (only when needed).</p>
<aside class="quote no-group" data-username="smpallen99" data-post="9" data-topic="17304">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/smpallen99/48/1157_2.png" class="avatar"> smpallen99:</div>
<blockquote>
<p>BTW, if you want to fetch the user on each request, you could to that with a plug pretty easy.</p>
</blockquote>
</aside>
<p>See, this is what only working with the domain / business logic code nets you. I keep forgetting about the beauties of <code>Plug</code>. Thanks for giving me a reality check!</p>
<aside class="quote no-group" data-username="smpallen99" data-post="9" data-topic="17304">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/smpallen99/48/1157_2.png" class="avatar"> smpallen99:</div>
<blockquote>
<p>Just don’t install the registerable option.</p>
</blockquote>
</aside>
<p>That’s what I thought as well but haven’t tried it yet. Thanks for confirming. <img src="https://forum.elixirforum.com/images/emoji/apple/+1.png?v=15" title=":+1:" class="emoji" alt=":+1:" loading="lazy" width="20" height="20"></p>
<aside class="quote no-group" data-username="smpallen99" data-post="9" data-topic="17304">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/smpallen99/48/1157_2.png" class="avatar"> smpallen99:</div>
<blockquote>
<p>BTW, I have just overhauled custom controllers. The generated controllers are now &lt; 10 lines long, with all the supporting actions and helpers overridable.</p>
</blockquote>
</aside>
<p>Do you have a recommendation on how can I update my already generated controllers? Or is it just <code>mix coh.install --reinstall</code> and <code>git diff</code> after?</p>
<p>BTW, Coherence is still at <code>0.5.2</code> for me and Hex claims there’s no newer version. Should I be using the git master version to get the latest changes or are you releasing a new version soon?</p>
<p>Thanks a lot for being responsive!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="100623" 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/auth-framework-need-advice-based-on-a-list-of-prerequisites/17304/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-100623" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="100623"
                     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 #13"></div>
  </section>
</div>
    <div class="postbit" id="100624" data-post-id="100624">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dimitarvp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/120/38664_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dimitarvp
                    <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>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I am not sure I remember well but weren’t JWT tokens all based off of the same secret? In a few other auth frameworks (not only in Elixir) every user has their own signing salt / secret which I feel is more secure.</p>
<p>Also, how does it deal with token revocation?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="100624" 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/auth-framework-need-advice-based-on-a-list-of-prerequisites/17304/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-100624" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="100624"
                     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 #14"></div>
  </section>
</div>
    <div class="postbit" id="100625" data-post-id="100625">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dimitarvp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/120/38664_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dimitarvp
                    <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>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Your library looks promising. A few questions:</p>
<ol>
<li>Do you have plans to replace <code>poison</code> with <code>jason</code> as others did (including the core team)?</li>
<li>I appreciate the opinionated approach – it saves code and time – and I usually code my internal libraries in the same manner. However in this case I absolutely need my auth library to work with an already existing model. Have you considered just offloading the DB responsibilities to an external (and configurable by the user) module? Example: Coherence generates <code>schemas.ex</code> file for you and you can just fetch users and other related data from practically anywhere if you change the functions. Enforcing such an external module via a behaviour would be even better.</li>
</ol>
<p>I have to say that I read your README in GitHub and your linked article. I love your approach and was gravitating to something very similar myself. It’s just that the added views from other libraries are quite tempting and I am not sure I wanna reinvent them (but it might turn out easy).</p>
<p>I’ll keep this thread updated on what I choose and why. Haven’t made the choice yet, still making test apps and trying to evaluate objectively.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="100625" 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/auth-framework-need-advice-based-on-a-list-of-prerequisites/17304/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-100625" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="100625"
                     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 #15"></div>
  </section>
</div>
    <div class="postbit" id="100628" data-post-id="100628">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I totally get that. I will most likely replace poison with jason in a coming version as to not add another dependency to new Phoenix applications. As for working with any schema it is a top priority in the rewrite currently going on as I realize my opinionated approach is a clear turnoff to some applications. Keep a look out and best of luck with what you chose!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="100628" 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/auth-framework-need-advice-based-on-a-list-of-prerequisites/17304/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-100628" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="100628"
                     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 #16"></div>
  </section>
</div>
    <div class="postbit" id="161362" data-post-id="161362">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Check Entrance <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<p><a href="https://github.com/henriquefernandez/entrance" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/henriquefernandez/entrance</a></p>
<p>Modules and functions to make authentication with  <em>Plug / Phoenix</em>  and  <em>Ecto</em>  easy without tons of configuration or boxing users into rigid framework.</p>
<p>The primary goal of  <em>Entrance</em>  is to build an opinionated interface and easy to use  <em>API</em>  on top of flexible modules that can also be used directly.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="161362" 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/auth-framework-need-advice-based-on-a-list-of-prerequisites/17304/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-161362" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="161362"
                     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 #17"></div>
  </section>
</div>
    <div class="postbit" id="161363" data-post-id="161363">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dimitarvp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/120/38664_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dimitarvp
                    <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>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Will do, thank you.</p>
<p>Although I’d be more charitable if I were you. Immediately dissing your competitor libraries as “rigid and bloated” is not competing in good faith.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="161363" 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/auth-framework-need-advice-based-on-a-list-of-prerequisites/17304/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-161363" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="161363"
                     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 #18"></div>
  </section>
</div>
    <div class="postbit" id="161372" data-post-id="161372">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thank you, i will update!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="161372" 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/auth-framework-need-advice-based-on-a-list-of-prerequisites/17304/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-161372" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="161372"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>