How to use the firebase/app.auth function in firebase

To help you get started, we’ve selected a few firebase examples, based on popular ways it is used in public projects.

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

github firebase / friendlypix-web / src / Post.js View on Github external
constructor(firebaseHelper, postId) {
    this.firebaseHelper = firebaseHelper;
    // List of all times running on the page.
    this.timers = [];

    // Firebase SDK.
    this.auth = firebase.auth();

    // Pointers to DOM elements.
    this.postElement = $(Post.createPostHtml(postId));
    MaterialUtils.upgradeTextFields(this.postElement);
    this.toast = $('.mdl-js-snackbar');
    this.theatre = $('.fp-theatre');

    // Adds the element to the main UI if thisis the first time this is called.
    if ($('.fp-image-container', '#page-post').children().length === 0) {
      $('.fp-image-container', '#page-post').append(this.postElement);
    }
  }
github NUS-ALSET / achievements / src / services / account.js View on Github external
checkEULAAgreement() {
    return firebase
      .ref(`/users/${firebase.auth().currentUser.uid}/acceptedEULA`)
      .once("value")
      .then(data => data.val());
  }
github ninjinkun / blog-feedback-app / src / components / pages / AuthPage / index.tsx View on Github external
useEffect(() => {
    fetchUser(firebase.auth());
    return () => undefined;
  }, []);
github 0918nobita / Tsundoku / client / src / app / state / auth / auth.effect.ts View on Github external
concatMap(async () => {
      await firebase.auth().signOut();
      return new SignOutSuccess();
    }),
    catchError(error => of(new SignOutFail(error)))
github JancoBH / Angular-Movies / src / app / core / auth.service.ts View on Github external
resetPassword(email: string) {
    const fbAuth = firebase.auth();

    return fbAuth.sendPasswordResetEmail(email)
      .then(() => this.notify.update('Password update email sent', 'info'))
      .catch((error) => this.handleError(error));
  }
github goemen / react-material-ui-typescript / src / pages / events / EventListCard.tsx View on Github external
public render() {
        const user = firebase.auth().currentUser || {} as any;
        const { event, classes, processingReservation } = this.props;
        return (
            
                }

                title={
                    
                        {event.title}
                    
                }
                subheader={{event.price ? `P${event.price}` : 'Free'}}
            />
github raviqqe / tasks / src / drivers / projects-repository.ts View on Github external
private get collection(): firebase.firestore.CollectionReference {
    return firebase
      .firestore()
      .collection("users")
      .doc((firebase.auth().currentUser as firebase.User).uid)
      .collection("projects");
  }
}
github ninjinkun / blog-feedback-app / src / components / pages / LoginView / index.tsx View on Github external
render() {
    const { loading, user } = this.props.user;
    if (loading && !user) {
      return (
        
      );
    } else if (user) {
      return (
        
      );
    } else {
      return (
        
      );
    }
  }
}
github mmontag / chip-player-js / src / App.js View on Github external
handleLogout() {
    firebase.auth().signOut().then(() => {
      this.setState({
        user: null,
        faves: [],
      });
    });
  }
github 0918nobita / Tsundoku / client / src / app / services / firestore-utils.ts View on Github external
export const mine = (ref: firebase.firestore.Query) =>
  ref.where('uid', '==', (firebase.auth().currentUser as firebase.User).uid);