src/AccessController/CredentialApiController.js
/*
    Called by the databases (the log) to see if entry should
    be allowed in the database. Return true if the entry is allowed,
    false is not allowed
  */
Called by the databases (the log) to see if entry should
be allowed in the database. Return true if the entry is allowed,
false is not allowed
Called by the databases ( the log ) to see if entry should be allowed in the database . Return true if the entry is allowed false is not allowed
async canAppend(entry, identityProvider) {
    return new Promise((resolve, reject) => {
      this.firebase.auth().onAuthStateChanged(async (user) => {
        if (user) {
          const verifiedIdentity = await identityProvider.verifyIdentity(
            entry.identity
          );
          return resolve(verifiedIdentity);
        } else {
          return resolve(false);
        }
      });
    });
  }
async canAppend ( entry , identityProvider ) { return new Promise ( ( resolve , reject ) => { this . firebase . auth ( ) . onAuthStateChanged ( async ( user ) => { if ( user ) { const verifiedIdentity = await identityProvider . verifyIdentity ( entry . identity ) ; return resolve ( verifiedIdentity ) ; } else { return resolve ( false ) ; } } ) ; } ) ; }
Called by the databases (the log) to see if entry should
be allowed in the database.
Called by the databases ( the log ) to see if entry should be allowed in the database .
// A user is signed in // Allow access if identity verifies // No user is signed in