Skip to content

Instantly share code, notes, and snippets.

@u007
Created June 26, 2019 09:08
Show Gist options
  • Save u007/74009bf56378511f2cca52dad23359df to your computer and use it in GitHub Desktop.
Save u007/74009bf56378511f2cca52dad23359df to your computer and use it in GitHub Desktop.
firebase function get current logged in user
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