UNPKG

strapi-plugin-firebase-authentication

Version:

Allows easy integration between clients utilizing Firebase for authentication and Strapi

56 lines (55 loc) 1.75 kB
/** * Config for Firebase Authentication Plugin * * Available email pattern tokens for phone-only users: * * {randomString} - Generates 8-character random alphanumeric string (lowercase) * Example: "a1b2c3d4" * * {phoneNumber} - Extracts digits from phone number * Example: "+1-234-567-8900" → "12345678900" * * {timestamp} - Current Unix timestamp in milliseconds * Example: "1704067200000" * * Pattern Examples: * - "{randomString}@phone-user.firebase.local" → "a1b2c3d4@phone-user.firebase.local" * - "phone_{phoneNumber}@myapp.local" → "phone_12345678900@myapp.local" * - "user_{timestamp}@temp.local" → "user_1704067200000@temp.local" * - "{phoneNumber}_{randomString}@app.com" → "12345678900_a1b2c3d4@app.com" * * IMPORTANT: Pattern must include at least one of {randomString} or {timestamp} * to ensure uniqueness across multiple users. */ export type FirebaseAuthConfig = { /** * Any key to encrypt the firebase json file * * @default 'your-key-here' */ firebaseJsonEncryptionKey: string; /** * Whether to generate dummy emails for phone-only users * * @default true */ emailRequired?: boolean; /** * Template pattern for generating dummy emails * Must include {randomString} or {timestamp} for uniqueness * * @default '{randomString}@phone-user.firebase.local' */ emailPattern?: string; }; declare const _default: { default: ({ env }: { env: any; }) => { firebaseJsonEncryptionKey: any; emailRequired: any; emailPattern: string; }; validator(config: FirebaseAuthConfig): void; }; export default _default;