How to use the firebase-tools.login function in firebase-tools

To help you get started, we’ve selected a few firebase-tools 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 jsayol / FireSQL / tools / test-data / test-setup.ts View on Github external
const config = require(resolvePath(
      homedir(),
      '.config/configstore/firebase-tools.json'
    ));
    cachedToken = config.tokens.refresh_token;
  } catch (err) {
    /* no problem */
  }

  if (cachedToken) {
    return cachedToken;
  }

  const {
    tokens: { refresh_token: freshToken }
  } = await firebaseTools.login.ci();

  return freshToken;
}
github firebase / firebase-js-sdk / tools / config.js View on Github external
.then(async userToken => {
    if (userToken) return userToken;
    const {
      tokens: { refresh_token: freshToken }
    } = await firebaseTools.login.ci();
    return freshToken;
  })
  // Capture the firebase test project
github forgepwa / the_forge / lib / firebase.js View on Github external
return new Promise((resolve) => {
      console.log('Launching Firebase authentication in the browser...');
      client.login.ci().then((user) => {
        conf.set('firebase.token', user.tokens.refresh_token);
        console.log('Successfully logged in. 🗝');
        resolve(user.tokens.refresh_token);
      }).catch(() => {
        throw new Error('Unable to store token.');
      });
    });
  },
github zendesk / linksf / run.js View on Github external
    .then(() => firebase.login({ nonInteractive: false }))
    .then(() => firebase.deploy({