aaronrenner / phx_gen_auth

An authentication system generator for Phoenix 1.5 applications.
774 stars 56 forks source link

maybe_store_return_to handles query string #68

Closed matthewlehner closed 4 years ago

matthewlehner commented 4 years ago

Before this change, maybe_store_return_to stores the request_path attribute of the Plug.Conn, but does not handle the query_string if it is present.

Now, we append the query_string to the request_path if it is present, in order to paths with query strings, and without them.

matthewlehner commented 4 years ago

Ah, thanks for the refactor! I wondered if that would be a better approach and originally had written it into a case statement. This looks much better!

aaronrenner commented 4 years ago

Thanks! Looks great! 🎉