aaronrenner / phx_gen_auth

An authentication system generator for Phoenix 1.5 applications.
772 stars 55 forks source link

Generator injection issue (plug :fetch_current_user) #22

Closed woylie closed 4 years ago

woylie commented 4 years ago

I just ran the generator in an existing project. Before, my browser pipeline in the router looked like this:

pipeline :browser do
    ...
    plug :put_secure_browser_headers, %{"content-security-policy" => @csp}
end

The generator put the options for put_secure_browser_headers behind fetch_current_user:

pipeline :browser do
    ...
    plug :put_secure_browser_headers
    plug :fetch_current_user, %{"content-security-policy" => @csp}
 end
aaronrenner commented 4 years ago

Thanks for reporting this! I just pushed a fix to master.