# Testing pow authenticated controllers

**URL:** <https://forum.elixirforum.com/t/testing-pow-authenticated-controllers/64795>\
**Category:** Questions\
**Tags:** phoenix, testing, pow\
**Created:** [July 6, 2024, 10:00pm UTC](https://forum.elixirforum.com/t/testing-pow-authenticated-controllers/64795 "2024-07-06T22:00:11Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![LostKobrakai](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/lostkobrakai/32/3072_2.png) [@LostKobrakai](https://forum.elixirforum.com/u/LostKobrakai)\
**Post date:** [July 8, 2024, 7:52pm UTC](https://forum.elixirforum.com/t/testing-pow-authenticated-controllers/64795/9 "2024-07-08T19:52:13Z")

</div>

Recycling a conn tries to do essentially the same as what happens when a browser would navigate to a new route. Only things like cookies, some headers, hostname, … will be retained. `assigns` are not retained between multiple requests being made, but need to be computed and set freshly for each request, so the same applies with recycles.

Here you have a conn, which was already used to do a request, then you assign some data and then you request a new page, trigger a recycle and therefore get rid of tje assign again.

If you do multiple request you likely want to authenticate, so that a session is started and not just for a single request by setting just assigns.

---

_[View the full topic](https://forum.elixirforum.com/t/testing-pow-authenticated-controllers/64795)._
