{"id":16799838,"url":"https://github.com/krizzu/firebase-auth-provider","last_synced_at":"2025-04-11T00:31:47.125Z","repository":{"id":187470101,"uuid":"675571518","full_name":"krizzu/firebase-auth-provider","owner":"krizzu","description":"A Ktor authentication provider for Firebase Auth","archived":false,"fork":false,"pushed_at":"2024-10-29T08:03:17.000Z","size":92,"stargazers_count":7,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T22:51:48.048Z","etag":null,"topics":["authentication","firebase-auth","kotlin","kotlin-library","ktor"],"latest_commit_sha":null,"homepage":"https://start.ktor.io/#/p/firebase-auth-provider","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krizzu.png","metadata":{"files":{"readme":"README.md","changelog":null,"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-08-07T08:24:50.000Z","updated_at":"2024-12-09T14:38:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"6fb732d9-c56c-443d-91c9-e35839e20889","html_url":"https://github.com/krizzu/firebase-auth-provider","commit_stats":null,"previous_names":["krizzu/firebase-auth-provider"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krizzu%2Ffirebase-auth-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krizzu%2Ffirebase-auth-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krizzu%2Ffirebase-auth-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krizzu%2Ffirebase-auth-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krizzu","download_url":"https://codeload.github.com/krizzu/firebase-auth-provider/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322201,"owners_count":21084333,"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","firebase-auth","kotlin","kotlin-library","ktor"],"created_at":"2024-10-13T09:29:53.626Z","updated_at":"2025-04-11T00:31:47.097Z","avatar_url":"https://github.com/krizzu.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Firebase Auth Provider\n\n[![Kotlin](https://img.shields.io/badge/kotlin-2.0.21-blue.svg?logo=kotlin)](http://kotlinlang.org)\n[![Maven Central Version](https://img.shields.io/maven-central/v/com.kborowy/firebase-auth-provider?logo=apachemaven\u0026link=https%3A%2F%2Fcentral.sonatype.com%2Fartifact%2Fcom.kborowy%2Ffirebase-auth-provider)](https://central.sonatype.com/artifact/com.kborowy/firebase-auth-provider)\n[![GitHub Release](https://img.shields.io/github/v/release/krizzu/firebase-auth-provider?display_name=release\u0026logo=github)](https://github.com/krizzu/firebase-auth-provider/releases)\n[![GitHub License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0)\n\n\nKtor authentication provider for Firebase Auth module.\n\n\n## Download\n\n```kotlin\nrepositories {\n  mavenCentral()\n}\ndependencies {\n  implementation(\"com.kborowy:firebase-auth-provider:VERSION\")\n}\n```\n\n## Usage\n\nYou need to setup [Firebase](https://firebase.google.com/) project\nwith [Authentication module](https://firebase.google.com/products/auth) enabled. See [sample project](./sample/README.md) to learn more.\n\n```kotlin\ninstall(Authentication) {\n    firebase(\"my-auth\") {\n        adminFile = File(\"path/to/admin/file.json\")\n        realm = \"Sample Server\"\n\n        /**\n         * A decoded and verified Firebase token.\n         * Can be used to get the uid and other user attributes available in the token.\n         */\n        validate { token -\u003e\n            UserIdPrincipal(token.uid)\n        }\n    }\n}\n```\n\n## API\n\n| **Param** | **Required** | **Description**                                                                                                                                                                                                                          |\n|-----------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| adminFile | Required | [File](https://docs.oracle.com/javase/8/docs/api/java/io/File.html) instance, pointing to your Service account for your Firebase project. See [sample project](./sample/README.md) to learn more.                                        |\n| validate  | Required | Lambda receiving decoded and verified [FirebaseToken](https://firebase.google.com/docs/reference/admin/java/reference/com/google/firebase/auth/FirebaseToken), expected to return Principal, if user is authorized or null otherwise.    |\n| realm     | Optional | String describing the protected area or the scope of protection. This could be a message like \"Access to the staging site\" or similar, so that the user knows to which space they are trying to get access to. Defaults to \"Ktor Server\" |\n\n# License\n\n    Copyright 2023 Krzysztof Borowy\n    \n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n    \n       http://www.apache.org/licenses/LICENSE-2.0\n    \n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrizzu%2Ffirebase-auth-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrizzu%2Ffirebase-auth-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrizzu%2Ffirebase-auth-provider/lists"}