{"id":18805778,"url":"https://github.com/mskian/subscribe-auth-push","last_synced_at":"2025-07-05T04:07:53.393Z","repository":{"id":98187635,"uuid":"287264286","full_name":"mskian/subscribe-auth-push","owner":"mskian","description":"A Simple Static Site with Web Auth Build Using Firebase for Web Push Notification.","archived":false,"fork":false,"pushed_at":"2020-08-27T06:15:15.000Z","size":80,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T09:51:51.872Z","etag":null,"topics":["cloudmessaging","css","firebase","firebase-auth","firebase-database","firebase-realtime-database","html","html5","javascript","push-notifications"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/mskian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2020-08-13T11:43:57.000Z","updated_at":"2024-05-30T16:08:42.000Z","dependencies_parsed_at":"2023-06-29T18:15:43.157Z","dependency_job_id":null,"html_url":"https://github.com/mskian/subscribe-auth-push","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mskian%2Fsubscribe-auth-push","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mskian%2Fsubscribe-auth-push/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mskian%2Fsubscribe-auth-push/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mskian%2Fsubscribe-auth-push/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mskian","download_url":"https://codeload.github.com/mskian/subscribe-auth-push/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248766743,"owners_count":21158301,"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":["cloudmessaging","css","firebase","firebase-auth","firebase-database","firebase-realtime-database","html","html5","javascript","push-notifications"],"created_at":"2024-11-07T22:44:58.130Z","updated_at":"2025-04-13T19:12:16.094Z","avatar_url":"https://github.com/mskian.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Web Push Notification\n\nA Simple Static Site with Web Auth Build Using Firebase for Web Push Notification.\n\n## Requirements\n\n- Firebase project\n- Firebase Project Web SDK - \u003chttps://firebase.google.com/docs/web/setup\u003e\n- Enable Google Firebase web Auth - \u003chttps://firebase.google.com/docs/auth/web/google-signin\u003e\n- Firebase Realtime Database - \u003chttps://firebase.google.com/docs/database\u003e\n\n## Features\n\nit is Pure Static site Built Using\n\n- HTML\n- CSS\n- Javascript\n\nyou can Hosted it Freely on Github pages and Netlify\n\n## Setup\n\n- Download or Clone this Repo Files to your Server\n- Create new Firebase project - \u003chttps://firebase.google.com/\u003e\n- Setup Project for Web app and Open `app.js` File \u003chttps://github.com/mskian/subscribe/blob/master/assets/js/app.js\u003e and add your Firebase Project Web SDK\n- Next Goto **Authentication** in Sign-in providers Enable the Google Sign-in Method\n- Add your Domain to Authorized domains you can find this Option on elow the Sign-in Method tab\n- Next Goto Realtime Databse - Create New database and Update the Database Rules\n- Add this Below Rules on Database Rules Section\n\n```json\n{\n\t\"rules\": {\n\t\t\"users\": {\n\t\t\t\"$uid\": {\n\t\t\t\t\".read\": \"$uid === auth.uid\",\n\t\t\t\t\".write\": \"$uid === auth.uid\"\n\t\t\t}\n\t\t},\n    \"userstoken\": {\n\t\t\t\"$uid\": {\n\t\t\t\t\".read\": \"$uid === auth.uid\",\n\t\t\t\t\".write\": \"$uid === auth.uid\"\n\t\t\t}\n\t\t}\n\t}\n}\n```\n\n- Save and Publish the Rules\n- That's all Our Site Setup is Done - Sign-in with your Google Account and Test the Site\n\n## Send Push Notifications\n\nCurrently i am working on Custom Dashboard for Sending Push notifications\nyou can send Push Notification via cURL - \u003chttps://firebase.google.com/docs/cloud-messaging/js/first-message\u003e\n\n```sh\ncurl -X POST -H \"Authorization: \u003cCLOUD MESSAGING SERVER KEY\u003e -H \"Content-Type: application/json\" -d '{\n  \"notification\": {\n    \"title\": \"Hello World\",\n    \"body\": \"Test Push\",\n    \"icon\": \"https://subscribe.example.com/assets/icons/Icon-48.png\",\n    \"click_action\": \"https://example.com\"\n  }\n  \"to\": \"\u003cUSER PUSH TOKEN\u003e\"\n}' \"https://fcm.googleapis.com/fcm/send\"\n```\n\n## LICENSE\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmskian%2Fsubscribe-auth-push","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmskian%2Fsubscribe-auth-push","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmskian%2Fsubscribe-auth-push/lists"}