Skip to content

MetaMask/react-native-google-acm

Repository files navigation

react-native-google-acm

Google ACM for react-native

Installation

npm install react-native-google-acm

Usage

import { signInWithGoogle } from 'react-native-google-acm';

// ...
export default function App() {
  return (
    <View style={styles.container}>
      <Button
        title="Sign In"
        onPress={() =>
          signInWithGoogle({
            nonce: '12313123123',
            serverClientId:
              '882363291751-2a37cchrq9oc1lfj1p419otvahnbhguv.apps.googleusercontent.com',
            autoSelectEnabled: false,
            filterByAuthorizedAccounts: true,
          })
            .then((credential) => {
              console.log(credential);
            })
            .catch((error) => {
              console.log(error);
            })
        }
      />
      <Button title="Sign Out" onPress={() => signOut()} />
    </View>
  );
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library