Created
June 26, 2019 09:08
-
-
Save u007/74009bf56378511f2cca52dad23359df to your computer and use it in GitHub Desktop.
firebase function get current logged in user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const auth: any = context.auth || {} | |
if (!auth || !auth.uid) { | |
//not logged in | |
} | |
let authUser = await admin.auth().getUser(auth.uid) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment