I'm attempting to deploy a minimal Firebase Function based on an authentication trigger. I've worked successfully before with https and database triggers but I'm getting an error while deploying an authentication trigger (docs, reference).
import * as functions from 'firebase-functions';
import * as admin from 'firebase-admin';
admin.initializeApp();
exports.onCreateUser = functions
.region('europe-west1')
.auth.user()
.onCreate((user: admin.auth.UserRecord, context: functions.EventContext) => {
console.log(`Triggered On Create User: ${user.email}, ${user.uid}.`);
});
I receive the following error:
Ignoring trigger "onCreateUser" because the service "firebaseauth.googleapis.com" is not yet supported.
I've tried changing my engine node version from 10
to 8
or changing the region to europe-west2
or us-central1
but any variations on my configuration would throw this error.
The documentation I've referenced does not mention a limited support for these triggers. Is there any page with an overview of unsupported services and their limitations?
I seem to have mixed up my intent to run serve
and deploy
here. As I have been told by a very responsive support team the serve
script spins up the emulator and is currently limited to the following scopes:
For the development phase, however, you can make use of the interactive shell:
$ firebase functions:shell
✔ functions: Emulator started at http://localhost:5001
i functions: Loaded functions: onCreateUser
firebase > onCreateUser({"uid":"99999","email":"test@testing.com"})
'Successfully invoked function.'
> Triggered On Create User: test@testing.com, 99999.
> Function returned undefined, expected Promise or value