UNPKG

firebase-tools

Version:
56 lines (51 loc) 1.91 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.init_auth = void 0; const resource_1 = require("../../resource"); exports.init_auth = (0, resource_1.resource)({ uri: "firebase://guides/init/auth", name: "auth_init_guide", title: "Firebase Authentication Init Guide", description: "guides the coding agent through configuring Firebase Authentication in the current project", }, async (uri) => { return { contents: [ { uri, type: "text", text: ` ### Configure Firebase Authentication **Permission & Setup:** - Request developer permission before implementing sign-up and login features - Configure authentication providers in \`firebase.json\`: \`\`\`json { "auth": { "providers": { "emailPassword": true, "googleSignIn": { "oAuthBrandDisplayName": "My App", "supportEmail": "support@example.com", "authorizedRedirectUris": [ "https://example-website.com", "http://localhost:4000" ] } } } } \`\`\` - Run \`firebase deploy --only auth\` to enable the configured providers **Implementation:** - Create sign-up and login pages using Firebase Authentication **Testing & Deployment:** - Test the complete sign-up and sign-in flow to verify authentication functionality - Deploy the application to production once authentication is verified and working properly **Next Steps:** - **Security Rules**: If an app uses *Cloud Firestore database*, *Cloud Storage for Firebase*, or *Firebase Realtime Database*, then please update user-based Security Rules that are structured according to the app's specific requirements. - **App Deployment**: Deploy the app to production after Security Rules are verified to be working properly. `.trim(), }, ], }; });