Social Sign In
This component is supports sign-in via different types of social providers such as Facebook and Google. At this point, only Facebook and Google are supported.

Usage

1
<SocialSignIn
2
clientId = {Environment.FACEBOOK.appId}
3
scopes = {
4
Environment.FACEBOOK.scope
5
}
6
type = "facebook"
7
triggerElement = {
8
<Button text="Connect With Facebook" style={[styles.button, styles.facebookBtn]}
9
textStyle={[styles.facebookText]}/>
10
}
11
onSuccess = {(result)=>{this.handleSocialSignIn("facebook",result)}}
12
onError = {(error)=>{this.handleSocialSignInError("facebook",error )}}
13
/>
Copied!

Supported Properties

clientId - client Id for the social provider
scopes - scope of the access required
type - type of social provider (Only Facebook and Google are supported as of now)
triggerElement - Trigger Element to trigger the authentication. It should support onPress or onClick property which will be executed as a callback.
onSuccess - on successful authentication
onError - on error in authentication
Last modified 3yr ago
Copy link