10 examples of 'firebase.auth().currentuser' in JavaScript

Every line of 'firebase.auth().currentuser' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
37protected getCurrentUser(): firebase.User | null {
38 return this.auth.currentUser;
39}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

42currentUser() {
43 return firebase.auth().currentUser
44}
19currentUser() {
20 return firebase.auth().currentUser
21}
14public getCurrentUser() : firebase.User | null {
15 return firebase
16 .auth()
17 .currentUser;
18}
18getAuth() {
19 return firebase.auth().currentUser.providerData[0];
20}
7export function getUser () {
8 return firebase.auth(app).currentUser
9}
20private getUserFromFirebaseUser(user): AuthenticatedUser | null {
21 if (user == null) {
22 return null
23 }
24 return {
25 uid: user.uid,
26 displayName: user.displayName,
27 email: user.email,
28 emailVerified: user.emailVerified,
29 }
30}
89public isAuth(uid?: string): boolean {
90 return !!this.getCurrentUser();
91}
328get auth(): FirebaseServiceNamespace<Auth> {
329 const fn: FirebaseServiceNamespace<Auth> = (app?: FirebaseApp) => {
330 return this.ensureApp(app).auth();
331 };
332 const auth = require('./auth/auth').Auth;
333 return Object.assign(fn, {Auth: auth});
334}
12export function auth(email, pw) {
13 return firebaseAuth().createUserWithEmailAndPassword(email, pw)
14 .then(saveUser);
15}

Related snippets