【发布时间】:2022-01-03 22:03:24
【问题描述】:
是否可以从 HTTPs 可调用函数中引发 Auth 错误?
我的意思是,而不是这个
if (err.code === "auth/email-already-exists") {
throw new functions.https.HttpsError(
"invalid-argument",
"The email address is already in use by other account"
);
}
类似
exports.signUp = functions
.region("us-central1")
.runWith({ memory: "2GB", timeoutSeconds: 120 })
.https.onCall(async (data, context) => {
...
if (err.code === "auth/email-already-exists") {
throw err;
}
...
}
【问题讨论】:
标签: firebase firebase-authentication google-cloud-functions