Missing `Scope` in `phx.gen.auth` docs

Hi everyone. I am following along the Phoenix docs for auth.

When discussing Scopes, we’re supposed to have a lib/my_app/accounts/scope.ex file, but I can’t seem to generate one. Is this expected?

The generated code includes a scope module. For an app named MyApp which had mix phx.gen.auth Accounts User users run on it, you will find the following module at lib/my_app/accounts/scope.ex:

Any tips would be appreciated. Thanks.

What version of phx new are you using? (Run mix phx.new --version). Its possible you are on the older version. If the version is < 1.8 try updating it with mix archive.install hex phx_new and then re-run the project init with auth.

2 Likes

ah, yup - v1.7.18

Thank you @tomkonidas !

1 Like