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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Sort of. It’s kind of working but I haven’t actually move any further than “oh it’s working, let’s move on to other part of the project now”.</p>
<p>I didn’t use Guardian though since I would have to also used hassox/guardian_db to prevent replay attack and consequently have to migrate couple more tables. It became a giant mess of many dependencies and tables very quickly. I haven’t found any good solution suggested short of more tables and more background processes.</p>
<p>I sort of stuck with Coherence once Ueberauth handed the request over. That said, I also made a package, <a href="https://github.com/mayppong/birbnest" rel="noopener nofollow ugc">birbnest</a>, for storing session in an Agent on server-side instead of worrying about JWT stuff. It’s not really actively maintained since it’s a pet project and it’s not hard to hand-rolled yourself tbh. In any case, JWT wasn’t worth the effort for what I needed.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="13822" 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/user-authentication-in-phoenix/118/45">Post #44</a>
	                </div>
	            </div>
              <div id="likers-container-13822" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="13822"
                     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 #44"></div>
  </section>
</div>
    <div class="postbit" id="13826" data-post-id="13826">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>this DOES feel like a mess imho, I just cracked my head on<br>
guardiandb guardian ueberauth and now starting canary .. I wish coherence<br>
and exadmin had a bridge to later</p>
<p>surely one hex could combine all this in a standard way?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="13826" 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/user-authentication-in-phoenix/118/46">Post #45</a>
	                </div>
	            </div>
              <div id="likers-container-13826" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="13826"
                     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 #45"></div>
  </section>
</div>
    <div class="postbit" id="13871" data-post-id="13871">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="niccolox" data-post="46" data-topic="118">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/niccolox/48/2601_2.png" class="avatar"> niccolox:</div>
<blockquote>
<p>surely one hex could combine all this in a standard way?</p>
</blockquote>
</aside>
<p>Too many ways to do authorization though.  There can be plug authorization, fine-grained permission that changes based on what is grabbed from the DB (like mine), etc… etc…</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="13871" 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/user-authentication-in-phoenix/118/47">Post #46</a>
	                </div>
	            </div>
              <div id="likers-container-13871" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="13871"
                     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 #46"></div>
  </section>
</div>
    <div class="postbit" id="13884" data-post-id="13884">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I do agree, somewhat. Maybe not one hex to rule them all, but something like needing guardian <strong>and</strong> guardian_db seems silly. To me, this replay attack is a bug and guardian needs to be fixed. The fact that guardian_db has existed for so long and not folded into guardian yet doesn’t inspire confidence in Ueberauth.</p>
<p>That said, I’m not into the JWT anyway so I’m probably pretty bias against guardian already.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="13884" 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/user-authentication-in-phoenix/118/48">Post #47</a>
	                </div>
	            </div>
              <div id="likers-container-13884" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="13884"
                     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 #47"></div>
  </section>
</div>
    <div class="postbit" id="13896" data-post-id="13896">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Guardian_db is for when you are using a JWT as a session container, which you should not really be doing.  JWT’s are intended for stateless API connections, the session should be used for stateful connections like HTTP.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="13896" 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/user-authentication-in-phoenix/118/49">Post #48</a>
	                </div>
	            </div>
              <div id="likers-container-13896" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="13896"
                     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 #48"></div>
  </section>
</div>
    <div class="postbit" id="13903" data-post-id="13903">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>But doesn’t Guardian uses JWT to store session by default? Did I miss where you can configure Guardian to use other session storage?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="13903" 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/user-authentication-in-phoenix/118/50">Post #49</a>
	                </div>
	            </div>
              <div id="likers-container-13903" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="13903"
                     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 #49"></div>
  </section>
</div>
    <div class="postbit" id="13905" data-post-id="13905">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Guardian does not use any storage at all, it is nothing but a JWT generator and reader, designed for and works amazingly for API endpoints.  Guardian_db uses storage (the database specifically) to ‘emulate’ a session storage for those who just want to use one thing for everything.  But you ‘should’ be using the normal phoenix session storage to hold normal, like, HTTP web pages connections, and JWT is best for, say, websockets or stateless API endpoints or ‘passing’ information securely via the client to a different server or so.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="13905" 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/user-authentication-in-phoenix/118/51">Post #50</a>
	                </div>
	            </div>
              <div id="likers-container-13905" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="13905"
                     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 #50"></div>
  </section>
</div>
    <div class="postbit" id="14675" data-post-id="14675">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>In case anyone stumbles upon this thread, I wrote a very simple blog post on how to roll your own authentication with Guardian and Comeonin.</p>
<aside class="quote" data-post="1" data-topic="2190">
  <div class="title">
    <div class="quote-controls"></div>
    <img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/hlx/48/2572_2.png" class="avatar">
    <div class="quote-title__text-content">
      <a href="https://forum.elixirforum.com/t/roll-your-own-email-password-authentication-with-guardian-comeonin-phoenix/2190" rel="nofollow">Roll your own Email &amp; Password Authentication with Guardian, Comeonin &amp; Phoenix</a> <a class="badge-category__wrapper " href="/c/learning-resources/guides-tuts-tips-info/61" rel="nofollow"><span data-category-id="61" style="--category-badge-color: #3AB54A; --category-badge-text-color: #FFFFFF; --parent-category-badge-color: #3AB54A;" data-parent-category-id="8" data-drop-close="true" class="badge-category --style-square --has-parent" title="Tutorials &amp; Guides Section"><span class="badge-category__name">Guides/Tuts/Tips/Info</span></span></a>
    </div>
  </div>
  <blockquote>
    Typed my very first blog post ever, hope it will help some people 
<a href="https://henricus.xyz/roll-your-own-email-password-authentication-with-guardian-comeonin-phoenix-dffd39c6ca44" class="onebox" target="_blank" rel="noopener nofollow ugc">https://henricus.xyz/roll-your-own-email-password-authentication-with-guardian-comeonin-phoenix-dffd39c6ca44</a>
  </blockquote>
</aside>
 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="14675" data-batch-url="/posts/batch_likers">
                        6
                      </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/user-authentication-in-phoenix/118/52">Post #51</a>
	                </div>
	            </div>
              <div id="likers-container-14675" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="14675"
                     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 #51"></div>
  </section>
</div>
    <div class="postbit" id="16237" data-post-id="16237">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hello Steve. Thanks for this awesome package. I’m trying Coherence and loving it. I’m just confused with the controllers. Where are they located? What’s the difference between passing and not passing --controllers to mix coherence.install? Again, thanks.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="16237" 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/user-authentication-in-phoenix/118/53">Post #52</a>
	                </div>
	            </div>
              <div id="likers-container-16237" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="16237"
                     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 #52"></div>
  </section>
</div>
    <div class="postbit" id="16558" data-post-id="16558">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>what seems to be missing here is integration between Phoenix/Coherence (Rails equivalent Devise) and Phoenix/Ueberauth (Rails equivalent Omniauth)</p>
<p>Devise <a href="https://github.com/plataformatec/devise" class="inline-onebox" rel="noopener nofollow ugc">GitHub - heartcombo/devise: Flexible authentication solution for Rails with Warden. · GitHub</a> has an Omniauth module</p>
<blockquote>
<p>Omniauthable: adds OmniAuth (<a href="https://github.com/omniauth/omniauth" class="inline-onebox" rel="noopener nofollow ugc">GitHub - omniauth/omniauth: OmniAuth is a flexible authentication system utilizing Rack middleware. · GitHub</a>) support.</p>
</blockquote>
<p>whereas Coherence doesn’t (afaik) <a href="https://github.com/smpallen99/coherence" class="inline-onebox" rel="noopener nofollow ugc">GitHub - smpallen99/coherence: Coherence is a full featured, configurable authentication system for Phoenix · GitHub</a></p>
<p>it would be great for the ecosystem (i.e. me) if that was changed</p>
<p><img src="https://forum.elixirforum.com/uploads/default/original/2X/4/4e4952929083aafd6474ca787b5a7a72eb0a324f.gif?v=15" title=":079:" class="emoji emoji-custom only-emoji" alt=":079:" loading="lazy" width="20" height="20"></p>
<p>I should also add I got Guardian, Guardian DB, Ueberauth &amp; Canary basically working</p>
<p>would like to have ExAdmin and Coherence also.. maybe that’s not realistic right now</p>
<p>..</p>
<p>it seems to me that an Coherence Ueberauthable module is an important missing piece</p>
<p>imho it would be great if Plataformatec could backfill this one !</p>
<p>I am new to Elixir but will see what I can contribute to this</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="16558" 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/user-authentication-in-phoenix/118/54">Post #53</a>
	                </div>
	            </div>
              <div id="likers-container-16558" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="16558"
                     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 #53"></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/118/load_more?page=6">Load more posts (53 remaining)</a>
</div></template></turbo-stream>