Skip to content

Instantly share code, notes, and snippets.

@spencercarli
Created March 9, 2016 01:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spencercarli/df9191c7d45f162b9c0c to your computer and use it in GitHub Desktop.
Save spencercarli/df9191c7d45f162b9c0c to your computer and use it in GitHub Desktop.
Setup the React Native App - index.js
// RNApp/app/index.js
import config from './config';
import { GoogleSignin } from 'react-native-google-signin';
/*
Removed for brevity
*/
componentWillMount() {
GoogleSignin.configure({
iosClientId: config.google.iosClientId,
});
ddpClient.connect((error, wasReconnect) => {
if (error) {
this.setState({connected: false});
} else {
this.setState({connected: true});
ddpClient.loginWithToken((err, res) => {
if (!err) this.handleSignedInStatus(true);
});
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment