Skip to content

Commit

Permalink
Replace pow with mix phx.auth
Browse files Browse the repository at this point in the history
* Run mix phx.auth to generate code
* Update generated code for existing cols and functions
* Add down for create_users_auth_tables
* Remove pow and redix
* Remove unused test config
* Update tests for register_and_log_in_user
* Add registration for fixture
* Update design for generated auth pages
* Fix flash alignment to actual top value
* Add container for mobile padding
* Reduce max password length
* Update user seeds to match min password reqs
* Add user invitation live
* Remove user confirmation email
* Load leagues in user settings
* Add redirector for old login pages
  • Loading branch information
axelclark committed Mar 10, 2024
1 parent 4dba86d commit 4a6144f
Show file tree
Hide file tree
Showing 69 changed files with 3,696 additions and 886 deletions.
9 changes: 0 additions & 9 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,6 @@ config :phoenix, :json_library, Jason

config :honeybadger, exclude_envs: [:dev, :test]

config :ex338, :pow,
user: Ex338.Accounts.User,
repo: Ex338.Repo,
web_module: Ex338Web,
extensions: [PowResetPassword, PowPersistentSession, PowInvitation],
controller_callbacks: Pow.Extension.Phoenix.ControllerCallbacks,
mailer_backend: Ex338Web.PowMailer,
cache_store_backend: Ex338Web.Pow.RedisCache

config :elixir, :time_zone_database, Tzdata.TimeZoneDatabase

config :kaffy,
Expand Down
2 changes: 0 additions & 2 deletions config/dev.exs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,4 @@ config :ex338, Ex338.Repo,

config :ex338, Ex338Web.Mailer, adapter: Swoosh.Adapters.Local

config :ex338, Ex338Web.PowMailer, adapter: Swoosh.Adapters.Local

config :honeybadger, :environment_name, :dev
8 changes: 0 additions & 8 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ if config_env() == :prod do
force_ssl: [rewrite_on: [:x_forwarded_proto]],
secret_key_base: secret_key_base

config :ex338, :pow_redis, uri: System.get_env("REDIS_URL")

# ## SSL Support
#
# To get SSL working, you will need to add the `https` key
Expand Down Expand Up @@ -116,10 +114,4 @@ if config_env() == :prod do
region: "us-east-1",
access_key: System.get_env("AWS_SES_ACCESS_KEY"),
secret: System.get_env("AWS_SES_SECRET")

config :ex338, Ex338Web.PowMailer,
adapter: Swoosh.Adapters.AmazonSES,
region: "us-east-1",
access_key: System.get_env("AWS_SES_ACCESS_KEY"),
secret: System.get_env("AWS_SES_SECRET")
end
8 changes: 3 additions & 5 deletions config/test.exs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import Config

# Only in tests, remove the complexity from the password hashing algorithm
config :bcrypt_elixir, :log_rounds, 1

# We don't run a server during test. If one is required,
# you can enable the server option below.
config :ex338, Ex338Web.Endpoint,
Expand All @@ -19,15 +22,10 @@ config :ex338, Ex338.Repo,
hostname: "localhost",
pool: Ecto.Adapters.SQL.Sandbox

config :comeonin, :bcrypt_log_rounds, 4
config :comeonin, :pbkdf2_rounds, 1

config :ex338, Ex338Web.Mailer, adapter: Swoosh.Adapters.Test

config :honeybadger, :environment_name, :test

config :ex338, Ex338Web.PowMailer, adapter: Swoosh.Adapters.Test

config :ex338, Oban, testing: :inline

# Initialize plugs at runtime for faster development compilation
Expand Down
Loading

0 comments on commit 4a6144f

Please sign in to comment.