{"id":19241939,"url":"https://github.com/r8/ash_authentication_firebase","last_synced_at":"2026-04-20T19:32:30.928Z","repository":{"id":260085556,"uuid":"715799332","full_name":"r8/ash_authentication_firebase","owner":"r8","description":"Firebase token authentication strategy for AshAuthentication.","archived":false,"fork":false,"pushed_at":"2024-11-25T10:29:08.000Z","size":28,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-29T21:49:04.655Z","etag":null,"topics":["ash","authentication","elixir","firebase","firebase-auth"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/r8.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-07T21:22:12.000Z","updated_at":"2024-11-25T10:29:09.000Z","dependencies_parsed_at":"2024-11-25T11:35:15.666Z","dependency_job_id":null,"html_url":"https://github.com/r8/ash_authentication_firebase","commit_stats":null,"previous_names":["r8/ash_authentication_firebase"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/r8/ash_authentication_firebase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r8%2Fash_authentication_firebase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r8%2Fash_authentication_firebase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r8%2Fash_authentication_firebase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r8%2Fash_authentication_firebase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r8","download_url":"https://codeload.github.com/r8/ash_authentication_firebase/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r8%2Fash_authentication_firebase/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32062390,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ash","authentication","elixir","firebase","firebase-auth"],"created_at":"2024-11-09T17:12:59.686Z","updated_at":"2026-04-20T19:32:30.908Z","avatar_url":"https://github.com/r8.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AshAuthentication.Firebase\n\n[![Hex.pm](https://img.shields.io/hexpm/v/ash_authentication_firebase.svg?style=flat-square)](https://hex.pm/packages/ash_authentication_firebase)\n[![Hex.pm](https://img.shields.io/hexpm/dt/ash_authentication_firebase.svg?style=flat-square)](https://hex.pm/packages/ash_authentication_firebase)\n\nFirebase token authentication strategy for [AshAuthentication](https://github.com/team-alembic/ash_authentication).\n\n\u003e 🛠 In development. Use at your own risk.\n\n## Installation\n\nThe package can be installed by adding `ash_authentication_firebase` to your list of dependencies in mix.exs:\n\n```elixir\ndef deps do\n  [\n    {:ash_authentication_firebase, \"~\u003e 0.2.0\"}\n  ]\nend\n```\n\n## Usage\n\nPlease consult with official [Ash documentation](https://ash-hq.org/docs/guides/ash_authentication/latest/tutorials/getting-started-with-authentication) on how to create your resource.\n\nAdd `AshAuthentication.Strategy.Firebase` to your resource `extensions` list and `:firebase` strategy to the `authentication` section:\n\n```elixir\ndefmodule MyApp.Accounts.User do\n  use Ash.Resource,\n    extensions: [AshAuthentication, AshAuthentication.Strategy.Firebase]\n\n...\n\n  authentication do\n    api MyApp.Accounts\n\n    strategies do\n      # You can have multiple firebase strategies\n      firebase :firebase do\n        project_id \"project-123abc\"\n        token_input :firebase_token\n      end\n    end\n  end\n...\n\nend\n```\n\n## Secrets and Runtime Configuration\n\nTo avoid hardcoding your Firebase project id in your source code, you can use the `AshAuthentication.Secret` behaviour. This allows you to provide the project id through runtime configuration using either an anonymous function or a module.\n\n### Examples:\n\nUsing an anonymous function:\n\n```elixir\nauthentication do\n  strategies do\n    firebase :firebase do\n      project_id fn _path, _resource -\u003e\n        Application.fetch_env(:my_app, :firebase_project_id)\n      end\n      token_input :firebase_token\n    end\n  end\nend\n```\n\nUsing a module:\n\n```elixir\ndefmodule MyApp.Secrets do\n  use AshAuthentication.Secret\n\n  def secret_for([:authentication, :strategies, :firebase, :project_id], MyApp.Accounts.User, _opts) do\n    Application.fetch_env(:my_app, :firebase_project_id)\n  end\nend\n\n# And in your resource:\n\nauthentication do\n  strategies do\n    firebase :firebase do\n      project_id MyApp.Secrets\n      token_input :firebase_token\n    end\n  end\nend\n```\n\n## Acknowledgements\n\nInspired by [ExFirebaseAuth](https://github.com/Nickforall/ExFirebaseAuth).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr8%2Fash_authentication_firebase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr8%2Fash_authentication_firebase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr8%2Fash_authentication_firebase/lists"}