How to use the react-native-config.GOOGLE_CLIENT_ID function in react-native-config

To help you get started, we’ve selected a few react-native-config 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 0mkara / RNAWebRTCApp / src / components / GoogleSigninButton / GoogleSignInButon.js View on Github external
constructor(props) {
    super(props);
    this.state = {
      isSigninInProgress: false
    };
    this._signIn = this._signIn.bind(this);
    console.log(env.GOOGLE_CLIENT_ID);
    console.log(env.GOOGLE_ANDROID_CLIENT_ID);
    const configure = {
      scopes: [], // what API you want to access on behalf of the user, default is email and profile
      webClientId: env.GOOGLE_CLIENT_ID, // client ID of type WEB for your server (needed to verify user ID and offline access)
      offlineAccess: true, // if you want to access Google API on behalf of the user FROM YOUR SERVER
      hostedDomain: '', // specifies a hosted domain restriction
      loginHint: '', // [iOS] The user's ID, or email address, to be prefilled in the authentication UI if possible. [See docs here](https://developers.google.com/identity/sign-in/ios/api/interface_g_i_d_sign_in.html#a0a68c7504c31ab0b728432565f6e33fd)
      forceConsentPrompt: true, // [Android] if you want to show the authorization prompt at each login.
      accountName: '', // [Android] specifies an account name on the device that should be used
      androidClientId: env.GOOGLE_ANDROID_CLIENT_ID // [iOS] optional, if you want to specify the client ID of type iOS (otherwise, it is taken from GoogleService-Info.plist)
    };
    GoogleSignin.configure(configure);
  }
  _signIn = async () => {
github 0mkara / RNAWebRTCApp / src / components / GoogleSigninButton / GoogleSignInButon.js View on Github external
constructor(props) {
    super(props);
    this.state = {
      isSigninInProgress: false
    };
    this._signIn = this._signIn.bind(this);
    console.log(env.GOOGLE_CLIENT_ID);
    console.log(env.GOOGLE_ANDROID_CLIENT_ID);
    const configure = {
      scopes: [], // what API you want to access on behalf of the user, default is email and profile
      webClientId: env.GOOGLE_CLIENT_ID, // client ID of type WEB for your server (needed to verify user ID and offline access)
      offlineAccess: true, // if you want to access Google API on behalf of the user FROM YOUR SERVER
      hostedDomain: '', // specifies a hosted domain restriction
      loginHint: '', // [iOS] The user's ID, or email address, to be prefilled in the authentication UI if possible. [See docs here](https://developers.google.com/identity/sign-in/ios/api/interface_g_i_d_sign_in.html#a0a68c7504c31ab0b728432565f6e33fd)
      forceConsentPrompt: true, // [Android] if you want to show the authorization prompt at each login.
      accountName: '', // [Android] specifies an account name on the device that should be used
      androidClientId: env.GOOGLE_ANDROID_CLIENT_ID // [iOS] optional, if you want to specify the client ID of type iOS (otherwise, it is taken from GoogleService-Info.plist)
    };
    GoogleSignin.configure(configure);
  }
  _signIn = async () => {
github bitnami-labs / cabin / src / config.js View on Github external
import RNConfig from 'react-native-config';
import alt from './alt';
import { version } from '../package.json';
import LocalesUtils from './utils/LocalesUtils';
import Intl from 'intl';
import _ from 'lodash';
import Immutable from 'immutable';
import './Stores';
import Constants from './utils/Constants';

const _window = global || window;

const CONFIGS = {
  dev: {
    VERSION: `${version}-dev`,
    GOOGLE_CLIENT_ID: RNConfig.GOOGLE_CLIENT_ID,
  },
  prod: {
    VERSION: version,
    GOOGLE_CLIENT_ID: RNConfig.GOOGLE_CLIENT_ID,
  },
};
_window.APP_CONFIG = RNConfig.env === 'production' ? CONFIGS.prod : CONFIGS.dev;

if (!_window.Intl) {
  _window.Intl = Intl; // polyfill for `Intl`
}

// import locales we are using. This should be in sync with `LocalesUtils.SUPPORTED_LANGUAGES`
import 'intl/locale-data/jsonp/en.js';
import 'intl/locale-data/jsonp/fr.js';
github bitnami-labs / cabin / src / config.js View on Github external
import Intl from 'intl';
import _ from 'lodash';
import Immutable from 'immutable';
import './Stores';
import Constants from './utils/Constants';

const _window = global || window;

const CONFIGS = {
  dev: {
    VERSION: `${version}-dev`,
    GOOGLE_CLIENT_ID: RNConfig.GOOGLE_CLIENT_ID,
  },
  prod: {
    VERSION: version,
    GOOGLE_CLIENT_ID: RNConfig.GOOGLE_CLIENT_ID,
  },
};
_window.APP_CONFIG = RNConfig.env === 'production' ? CONFIGS.prod : CONFIGS.dev;

if (!_window.Intl) {
  _window.Intl = Intl; // polyfill for `Intl`
}

// import locales we are using. This should be in sync with `LocalesUtils.SUPPORTED_LANGUAGES`
import 'intl/locale-data/jsonp/en.js';
import 'intl/locale-data/jsonp/fr.js';

// Global variables
_window.ReactNative = ReactNative;
_window.React = React;
_window.Component = React.Component;