{"id":15485686,"url":"https://github.com/codenoid/phoenix-auth-example","last_synced_at":"2025-06-19T00:03:46.552Z","repository":{"id":35730167,"uuid":"185634746","full_name":"codenoid/phoenix-auth-example","owner":"codenoid","description":"Phoenix authentication example with ETS, Multi Session \u0026 Single Session example","archived":false,"fork":false,"pushed_at":"2023-01-04T12:53:20.000Z","size":2197,"stargazers_count":4,"open_issues_count":26,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T17:13:42.940Z","etag":null,"topics":["authentication","elixir","phoenix"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codenoid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-08T15:37:22.000Z","updated_at":"2022-05-31T02:01:27.000Z","dependencies_parsed_at":"2023-01-16T04:21:36.975Z","dependency_job_id":null,"html_url":"https://github.com/codenoid/phoenix-auth-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codenoid/phoenix-auth-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenoid%2Fphoenix-auth-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenoid%2Fphoenix-auth-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenoid%2Fphoenix-auth-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenoid%2Fphoenix-auth-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codenoid","download_url":"https://codeload.github.com/codenoid/phoenix-auth-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenoid%2Fphoenix-auth-example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260654625,"owners_count":23042672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","elixir","phoenix"],"created_at":"2024-10-02T06:02:27.553Z","updated_at":"2025-06-19T00:03:41.521Z","avatar_url":"https://github.com/codenoid.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phoenix Auth Example\n\nso basically : \n\n1. Multi Session is just like facebook, gmail or github, you can login anywhere without terminating other session\n2. Single Session is, when you login (new session), your old session will be terminated (logged out)\n\nMulti Session Tech : \n - I only use phoenix session to save session data\n\nhttps://github.com/codenoid/phoenix-auth-example/blob/master/multi/lib/multi_web/controllers/page_controller.ex\nhttps://github.com/codenoid/phoenix-auth-example/blob/master/multi/lib/multi_web/helper/session.ex\n\nSingle Session Tech : \n - I use ETS for saving where this username is assigned for (*for guid cookie)\n - Phoenix session to save session data\n - I prefer to use redis (ETS replacement for scaling)\n\nhttps://github.com/codenoid/phoenix-auth-example/blob/master/single/lib/single/application.ex\nhttps://github.com/codenoid/phoenix-auth-example/blob/master/single/lib/single_web/controllers/page_controller.ex\nhttps://github.com/codenoid/phoenix-auth-example/blob/master/single/lib/single_web/helper/session.ex\n\n## Usage\n\n```bash\ngit clone https://github.com/codenoid/phoenix-auth-example\ncd phoenix-auth-example\ncd single # pick one\nmix deps.get\ncd assets \u0026\u0026 npm install\ncd .. \u0026\u0026 mix phx.server\ngoogle-chrome \"http://localhost:4000\" # login 1\ngoogle-chrome \"http://localhost:4000\" --incognito # login 2, login 1 will be destroyed\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodenoid%2Fphoenix-auth-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodenoid%2Fphoenix-auth-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodenoid%2Fphoenix-auth-example/lists"}