Implement user auth with Firebase
This commit is contained in:
@ -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"
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user