monkeytype/backend/handlers/auth.js

14 lines
296 B
JavaScript
Raw Normal View History

2021-06-07 00:32:37 +08:00
const admin = require("firebase-admin");
module.exports = {
async verifyIdToken(idToken) {
return await admin.auth().verifyIdToken(idToken);
},
async updateAuthEmail(uid, email) {
return await admin.auth().updateUser(uid, {
email,
emailVerified: false,
});
},
2021-06-07 00:32:37 +08:00
};