├── .formatter.exs ├── .github └── workflows │ └── ci.yml ├── .gitignore ├── CHANGELOG.md ├── LICENSE.md ├── README.md ├── config └── config.exs ├── guides ├── assets │ └── magic_auth_in_action.gif ├── customization.md ├── getting_started.md ├── log_out_user_or_session.md ├── multi_tenancy.md └── testing.md ├── lib ├── magic_auth.ex ├── magic_auth │ ├── callbacks.ex │ ├── config.ex │ ├── controllers │ │ └── session_controller.ex │ ├── live │ │ ├── login_live.ex │ │ └── password_live.ex │ ├── magic_auth_test.ex │ ├── multi.ex │ ├── repo.ex │ ├── router.ex │ ├── schemas │ │ ├── one_time_password.ex │ │ └── session.ex │ ├── token_bucket.ex │ └── token_buckets │ │ ├── login_attempt_token_bucket.ex │ │ └── one_time_password_request_token_bucket.ex └── mix │ └── tasks │ ├── magic_auth.install.ex │ └── magic_auth.setup_test_db.ex ├── mix.exs ├── mix.lock ├── package.json ├── priv ├── static │ ├── index.js │ └── one_time_password_input.js └── templates │ └── magic_auth.install │ ├── 20250422184441_create_magic_auth_tables.exs.eex │ └── magic_auth.ex.eex └── test ├── e2e └── mix │ └── tasks │ ├── magic_auth.install_test.exs │ └── magic_auth.install_umbrella_test.exs ├── magic_auth ├── config_test.exs ├── controllers │ └── session_controller_test.exs ├── one_time_password_test.exs ├── router_test.exs ├── test_helpers_test.exs └── token_bucket_test.exs ├── magic_auth_test.exs ├── mix └── tasks │ └── magic_auth.install_test.exs ├── support ├── conn_case.ex ├── data_case.ex ├── endpoint.ex ├── helpers.ex ├── repo.ex ├── test_router.ex └── user.ex └── test_helper.exs /.formatter.exs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/.formatter.exs -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/.github/workflows/ci.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/.gitignore -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/LICENSE.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/README.md -------------------------------------------------------------------------------- /config/config.exs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/config/config.exs -------------------------------------------------------------------------------- /guides/assets/magic_auth_in_action.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/guides/assets/magic_auth_in_action.gif -------------------------------------------------------------------------------- /guides/customization.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/guides/customization.md -------------------------------------------------------------------------------- /guides/getting_started.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/guides/getting_started.md -------------------------------------------------------------------------------- /guides/log_out_user_or_session.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/guides/log_out_user_or_session.md -------------------------------------------------------------------------------- /guides/multi_tenancy.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/guides/multi_tenancy.md -------------------------------------------------------------------------------- /guides/testing.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/guides/testing.md -------------------------------------------------------------------------------- /lib/magic_auth.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/lib/magic_auth.ex -------------------------------------------------------------------------------- /lib/magic_auth/callbacks.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/lib/magic_auth/callbacks.ex -------------------------------------------------------------------------------- /lib/magic_auth/config.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/lib/magic_auth/config.ex -------------------------------------------------------------------------------- /lib/magic_auth/controllers/session_controller.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/lib/magic_auth/controllers/session_controller.ex -------------------------------------------------------------------------------- /lib/magic_auth/live/login_live.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/lib/magic_auth/live/login_live.ex -------------------------------------------------------------------------------- /lib/magic_auth/live/password_live.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/lib/magic_auth/live/password_live.ex -------------------------------------------------------------------------------- /lib/magic_auth/magic_auth_test.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/lib/magic_auth/magic_auth_test.ex -------------------------------------------------------------------------------- /lib/magic_auth/multi.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/lib/magic_auth/multi.ex -------------------------------------------------------------------------------- /lib/magic_auth/repo.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/lib/magic_auth/repo.ex -------------------------------------------------------------------------------- /lib/magic_auth/router.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/lib/magic_auth/router.ex -------------------------------------------------------------------------------- /lib/magic_auth/schemas/one_time_password.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/lib/magic_auth/schemas/one_time_password.ex -------------------------------------------------------------------------------- /lib/magic_auth/schemas/session.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/lib/magic_auth/schemas/session.ex -------------------------------------------------------------------------------- /lib/magic_auth/token_bucket.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/lib/magic_auth/token_bucket.ex -------------------------------------------------------------------------------- /lib/magic_auth/token_buckets/login_attempt_token_bucket.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/lib/magic_auth/token_buckets/login_attempt_token_bucket.ex -------------------------------------------------------------------------------- /lib/magic_auth/token_buckets/one_time_password_request_token_bucket.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/lib/magic_auth/token_buckets/one_time_password_request_token_bucket.ex -------------------------------------------------------------------------------- /lib/mix/tasks/magic_auth.install.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/lib/mix/tasks/magic_auth.install.ex -------------------------------------------------------------------------------- /lib/mix/tasks/magic_auth.setup_test_db.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/lib/mix/tasks/magic_auth.setup_test_db.ex -------------------------------------------------------------------------------- /mix.exs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/mix.exs -------------------------------------------------------------------------------- /mix.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/mix.lock -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/package.json -------------------------------------------------------------------------------- /priv/static/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/priv/static/index.js -------------------------------------------------------------------------------- /priv/static/one_time_password_input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/priv/static/one_time_password_input.js -------------------------------------------------------------------------------- /priv/templates/magic_auth.install/20250422184441_create_magic_auth_tables.exs.eex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/priv/templates/magic_auth.install/20250422184441_create_magic_auth_tables.exs.eex -------------------------------------------------------------------------------- /priv/templates/magic_auth.install/magic_auth.ex.eex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/priv/templates/magic_auth.install/magic_auth.ex.eex -------------------------------------------------------------------------------- /test/e2e/mix/tasks/magic_auth.install_test.exs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/test/e2e/mix/tasks/magic_auth.install_test.exs -------------------------------------------------------------------------------- /test/e2e/mix/tasks/magic_auth.install_umbrella_test.exs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/test/e2e/mix/tasks/magic_auth.install_umbrella_test.exs -------------------------------------------------------------------------------- /test/magic_auth/config_test.exs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/test/magic_auth/config_test.exs -------------------------------------------------------------------------------- /test/magic_auth/controllers/session_controller_test.exs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/test/magic_auth/controllers/session_controller_test.exs -------------------------------------------------------------------------------- /test/magic_auth/one_time_password_test.exs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/test/magic_auth/one_time_password_test.exs -------------------------------------------------------------------------------- /test/magic_auth/router_test.exs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/test/magic_auth/router_test.exs -------------------------------------------------------------------------------- /test/magic_auth/test_helpers_test.exs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/test/magic_auth/test_helpers_test.exs -------------------------------------------------------------------------------- /test/magic_auth/token_bucket_test.exs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/test/magic_auth/token_bucket_test.exs -------------------------------------------------------------------------------- /test/magic_auth_test.exs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/test/magic_auth_test.exs -------------------------------------------------------------------------------- /test/mix/tasks/magic_auth.install_test.exs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/test/mix/tasks/magic_auth.install_test.exs -------------------------------------------------------------------------------- /test/support/conn_case.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/test/support/conn_case.ex -------------------------------------------------------------------------------- /test/support/data_case.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/test/support/data_case.ex -------------------------------------------------------------------------------- /test/support/endpoint.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/test/support/endpoint.ex -------------------------------------------------------------------------------- /test/support/helpers.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/test/support/helpers.ex -------------------------------------------------------------------------------- /test/support/repo.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/test/support/repo.ex -------------------------------------------------------------------------------- /test/support/test_router.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/test/support/test_router.ex -------------------------------------------------------------------------------- /test/support/user.ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/test/support/user.ex -------------------------------------------------------------------------------- /test/test_helper.exs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gushonorato/magic_auth/HEAD/test/test_helper.exs --------------------------------------------------------------------------------