{"id":15481512,"url":"https://github.com/dalenguyen/integrate-firebase-template","last_synced_at":"2025-04-22T15:24:59.097Z","repository":{"id":81775522,"uuid":"315486284","full_name":"dalenguyen/integrate-firebase-template","owner":"dalenguyen","description":"Template WordPress plugin for extending Integrate Firebase PRO plugin","archived":false,"fork":false,"pushed_at":"2025-02-09T23:41:17.000Z","size":177,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T16:23:15.335Z","etag":null,"topics":["firebase","hacktoberfest","wordpress","wordpress-development","wordpress-plugin"],"latest_commit_sha":null,"homepage":"https://wordpress.dalenguyen.me","language":"JavaScript","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/dalenguyen.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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-11-24T01:33:45.000Z","updated_at":"2025-02-09T23:41:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"404543b7-c71e-4380-8eae-fb83b2ddb3f0","html_url":"https://github.com/dalenguyen/integrate-firebase-template","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/dalenguyen%2Fintegrate-firebase-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalenguyen%2Fintegrate-firebase-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalenguyen%2Fintegrate-firebase-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalenguyen%2Fintegrate-firebase-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dalenguyen","download_url":"https://codeload.github.com/dalenguyen/integrate-firebase-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250265780,"owners_count":21402167,"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":["firebase","hacktoberfest","wordpress","wordpress-development","wordpress-plugin"],"created_at":"2024-10-02T05:04:42.543Z","updated_at":"2025-04-22T15:24:59.060Z","avatar_url":"https://github.com/dalenguyen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Integrate Firebase Template PLugin\n\nContributors: dalenguyen\n\nTags: firebase, wordpress\n\nRequires at least: 4.0.0\n\nTested up to: 5.5\n\nStable tag: 1.2.0\n\nRequires PHP: 5.2.4\n\nIntegrate Firebase Template is an extention that helps to expand [Integrate Firebase PRO](https://techcater.com) plugin.\n\n## Description\n\nIf you are an Integrate Firebase PRO user, and want to add more feature to your site, you can utilize this template.\n\n### Links\n\n- [Project page](https://techcater.com/)\n\n## Installation\n\nThis extension requires [Integrate Firebase PRO](https://techcater.com) plugin.\n\nIf you want to change the name of this extension, you can search for the string `template`, and repalce it with your desired name.\n\n## Email Verification Setup\n\nTo enable email verification functionality:\n\n1. Sign up for a [Resend](https://resend.com) account and get your API key\n2. Set up your environment variables:\n   ```\n   RESEND_API_KEY=your_resend_api_key_here\n   VERIFICATION_REDIRECT_URL=https://your-wordpress-site.com/my-account # Where to redirect after verification\n   CUSTOM_VERIFICATION_BASE_URL=https://your-wordpress-site.com # Your WordPress site domain\n   ```\n3. Configure Firebase Console:\n   - Go to Authentication \u003e Settings \u003e Authorized domains\n   - Add your WordPress domain (e.g., your-wordpress-site.com)\n4. Create a WordPress page for email verification (e.g., /verify-email)\n5. Add the verification HTML to your page:\n   ```html\n   \u003cdiv class=\"email-verification-container\"\u003e\n       \u003ch2\u003eEmail Verification\u003c/h2\u003e\n       \u003cdiv id=\"verification-status\"\u003eChecking verification status...\u003c/div\u003e\n   \u003c/div\u003e\n   ```\n6. Enqueue the verification script on your verification page\n7. Deploy your Firebase functions\n\nThe email verification system includes:\n- Custom email templates using Resend\n- Direct WordPress verification handling (no Firebase redirect)\n- Secure verification links with proper URL parameters\n- Automatic verification status tracking\n- Configurable redirect after verification\n\n### WordPress Integration\n\nThe verification process happens directly on your WordPress site:\n1. User receives verification email with a direct link to your WordPress site\n2. Link includes all necessary Firebase parameters\n3. WordPress page handles verification using Firebase SDK\n4. On success, user is redirected to VERIFICATION_REDIRECT_URL\n\n#### URL Configuration\n\nThe verification system uses two main URLs:\n1. `CUSTOM_VERIFICATION_BASE_URL`: Your WordPress site's domain (e.g., https://example.com)\n2. `VERIFICATION_REDIRECT_URL`: Where to redirect after successful verification\n\nThe verification link will be constructed as:\n```\n${CUSTOM_VERIFICATION_BASE_URL}/verify-email?oobCode=xxx\u0026mode=verifyEmail\u0026lang=en\n```\n\nExample configuration:\n```\n# Base domain for verification\nCUSTOM_VERIFICATION_BASE_URL=https://example.com\n\n# Redirect to account page after verification\nVERIFICATION_REDIRECT_URL=https://example.com/my-account\n```\n\nNote: Make sure to create a WordPress page at `/verify-email` path to handle the verification process.\n\nThe verification handler includes security measures:\n- Validates all URLs to prevent open redirects\n- Only allows redirects to same domain\n- Falls back to default URLs if validation fails\n\n## Examples\n\n- [Trigger custom functions and save data to Firebase (Realtime / Firestore)](js/firebase-trigger-functions.js)\n- [Email actions after register / login)](js/email-action-handler.js)\n- [Retrieve data from firestore and display it](js/retrieve-from-firestore-and-display.js)\n- [Call cloud functions](js/call-cloud-functions.js)\n- [Send email verification](js/send-verification-email.js) - Example of triggering email verification for users\n- [Handle email verification](js/verify-email.js) - Example of handling verification on WordPress\n\n## [Changelog](/CHANGELOG.md)\n\n## Requests / Issues\n\nPlease use [github issues](https://github.com/dalenguyen/integrate-firebase-template/issues) when submitting your logs. Please do not post to the forums.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdalenguyen%2Fintegrate-firebase-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdalenguyen%2Fintegrate-firebase-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdalenguyen%2Fintegrate-firebase-template/lists"}