-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
user.create not being triggered when using passwordless email login. #226
Comments
Thanks for the report! We're working on resolving this; stay tuned! |
Same issue. The trigger was working in |
@valmassoi If you reverted your SDK version, does it work again? |
Yep @laurenzlong I just reverted and it works again (but I'd like to get on v1 asap): $ yarn add firebase-functions@0.8.1 -E
# undo migration guide code changes
$ date && firebase deploy --only functions:createUser Also note when I was on |
@valmassoi Could you share your code for both v0.8.1 and v1.0.1 versions? They're both targetting the same backend so I'm very confused as to why the SDK version would affect whether the function gets triggered. |
// v1.0.1
export const createUser = functions.auth
.user()
.onCreate(async (userRecord, context) => {
const { uid, email, displayName } = userRecord
const [firstName, lastName] = displayName ? displayName.split(' ') : ['', '']
const newUserRecord = {
uid,
email,
firstName,
lastName,
qualificationRecord: {
kyc: "Incomplete",
accreditation: "Incomplete",
}
}
const userDocRef = admin.firestore().collection('users').doc(email)
await userDocRef.set(newUserRecord)
return
}) // v0.8.1
export const createUser = functions.auth
.user()
.onCreate(async (event) => {
const user = event.data
const { uid, email, displayName } = user
const [firstName, lastName] = displayName ? displayName.split(' ') : ['', '']
const userRecord = {
uid,
email,
firstName,
lastName,
qualificationRecord: {
kyc: "Incomplete",
accreditation: "Incomplete",
}
}
const userDocRef = admin.firestore().collection('users').doc(email)
await userDocRef.set(userRecord)
return
}) When it doesn't work I don't even see the |
Does Where |
The lack of functions getting triggered on a passwordless e-mail login was a server-side issue; we've fixed that now! Thanks again for the reports; let us know if you're still having trouble. |
Confirmed it's working again - thanks @rjhuijsman |
I am experiencing same issue with anonymous user creation:
|
Plus the anonym user has property: isAnonymous: false, which is wrong as well |
Issue was on my side - new firebase functions version with correct syntax fixed the issue: |
* Scheduler * unit tests * Adds integration tests for scheduled functions * removing uninented commit * fixing version number * adding labels and test for labels * trigger tests off of call to cloud scheduler:run * adding region/runtime opts tests * Predictions Functions (#220) * Firebase Predictions Integration with Functions - Initial check in * Add predictions getter * Make API match what was in the review, and add unit tests. * Fix imports. * Add error handling. * Handle process.env.GCLOUD_PROJECT correctly. * Fix region. * Upper case RiskToleranceName. * Add changelog message. * formatting * cleaning up * Revert "Predictions Functions (#220)" (#226) This reverts commit 838597aa6df973462a50484ec1f50d625da3f633. * pr fixes * adding clarifying comments * starting on pubsub impl * adds pusbub.schedule() * switching tests over from https to pubsub * Change timezone to a method instead of an optional argument * use real eventType * remove extra slash * changelog * switch signature to onRun(context) * switches changelog to present tense
Version info
Steps to reproduce
Create a firebase function that gets triggered on.create(), use the firebase passwordless email auth, authenticate into your application,
Were you able to successfully deploy your functions?
Yes
Expected behavior
Function runs on user.create() function.
Actual behavior
The function doesn't get triggered.
The text was updated successfully, but these errors were encountered: