Implement user auth with Firebase

This commit is contained in:
Conor McNamara
2023-03-06 20:23:54 +00:00
parent 2d41b93932
commit ef9b4847af
24 changed files with 1402 additions and 1258 deletions

View File

@ -165,4 +165,15 @@ exports.postLiveTrainData = functions.https.onRequest((request, response) => {
})
})
})
})
exports.securefunction = functions.https.onCall((data, context) => {
if (typeof context.auth === undefined) {
// user not logged in
return "User is not logged in"
}
else {
// user logged in
return "User is logged in"
}
})