Closed jf closed 2 months ago
What are the steps to reproduce the infinite loop? I just tried:
storage
folder, start the apphttp://localhost:8080/app
However it doesn't redirect me at all--I still end up on the /app
page (although the page says Signed in as .
since there isn't actually a user document in the database).
Also, both wrap-redirect-signed-in
and wrap-signed-in
(probably need better names for those...) use the same condition--(some? (:uid session))
--so I'm not seeing how those two middlewares could get into a redirect loop unless you modified one of the conditions (e.g. by changing it to (some? (xt/entity db (:uid session)))
) but not the other.
Also, both wrap-redirect-signed-in and wrap-signed-in (probably need better names for those...) use the same condition--(some? (:uid session))--so I'm not seeing how those two middlewares could get into a redirect loop unless you modified one of the conditions (e.g. by changing it to (some? (xt/entity db (:uid session)))) but not the other.
I see that now. Sorry, my bad! I've been working so long from a finished tutorial, I've assumed that the state of the code at start = state of the code at end. Obviously I'm wrong here and yes, b3d523446b47e1c01cf532c1c00e5b055fcdaf38 is wrong. I'll add a commit to back out the change + put in the actual fix.
actually the fix should be with biffweb.com; so I'll close this PR out. Apologies for the mistake!
this would happen in the case of say a dev db cleanup, or a user being removed in prod, etc.