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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>You can already access session cookie data as seen in the post before yours.</p>
<p>Generally <code>SameSite</code> is only a layer of defence. E.g. it depends on all your subdomains for a given root domain (based on <a href="https://publicsuffix.org/" rel="nofollow">https://publicsuffix.org/</a>) to be save to provide security.</p>
<aside class="quote no-group" data-username="andreyvolokitin" data-post="41" data-topic="4731">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/andreyvolokitin/48/35974_2.png" class="avatar"> andreyvolokitin:</div>
<blockquote>
<p>Also, how could banning the user be implemented when using a token-based socket authentification? <a href="http://cryto.net/%7Ejoepie91/blog/2016/06/19/stop-using-jwt-for-sessions-part-2-why-your-solution-doesnt-work/" rel="nofollow">It looks to be problematic</a></p>
</blockquote>
</aside>
<p>Take a loot at <code>phx.gen.auth</code>. It has all the pieces needed to implement that.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="363343" 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/accessing-cookies-in-phoenix-socket-connect/4731/42">Post #41</a>
	                </div>
	            </div>
              <div id="likers-container-363343" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="363343"
                     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 #41"></div>
  </section>
</div>
    <div class="postbit" id="363395" data-post-id="363395">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="LostKobrakai" data-post="42" data-topic="4731">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/lostkobrakai/48/3072_2.png" class="avatar"> LostKobrakai:</div>
<blockquote>
<p>Take a loot at <code>phx.gen.auth</code>. It has all the pieces needed to implement that.</p>
</blockquote>
</aside>
<p>Does it also applies to socket auth? I didn’t yet research current docs for  <code>phx.gen.auth</code>, but stumbled upon this thread stating that no cookies can be used for auth in sockets, while I hoped to use server-stored sessions with cookies for socket auth (as well as for regular auth). I will research the post you mentioned as well as the docs</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="363395" 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/accessing-cookies-in-phoenix-socket-connect/4731/43">Post #42</a>
	                </div>
	            </div>
              <div id="likers-container-363395" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="363395"
                     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 #42"></div>
  </section>
</div>
    <div class="postbit" id="368367" data-post-id="368367">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I am extremely sorry to revive this extremely old thread, but I am trying to access a cookies in a socket connection, and unable to, I posted by entire setup here (<a href="https://forum.elixirforum.com/t/how-to-use-phoenix-socket-on-localhost-with-react-frontend/71468" class="inline-onebox" rel="nofollow">How to use Phoenix `socket` on localhost with React Frontend?</a>)</p>
<p>I would really appreciate if someone could point me to where I messed up</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="368367" 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/accessing-cookies-in-phoenix-socket-connect/4731/44">Post #43</a>
	                </div>
	            </div>
              <div id="likers-container-368367" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="368367"
                     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>