For the complete documentation index, see llms.txt. This page is also available as Markdown.

Social Login API

Enable Google, Apple, and Facebook sign-in using the WebToNative JavaScript API. Add secure social login to Android and iOS apps.

You'll need to import the javascript file in your website before starting from this link.
const { facebook, google, apple } = WTN.socialLogin;

//Login Commands
facebook.login({
  callback : function(value){
    console.log(value)
  }
});

google.login({
  callback : function(value){
    console.log(value)
  }
});

apple.login({
  callback : function(value){
    console.log(value)
  }
})

//Logout Commands
facebook.logout({
  callback : function(value){
    console.log(value)
  }
});

google.logout({
  callback : function(value){
    console.log(value)
  }
});

We have wordpress plugin for social login integration. Kindly find webtonative wordpress plugin from below link. https://wordpress.org/plugins/webtonative/

Callback parameter object

Login :-

Login Error :-

Logout :-

Login :-

Login Error :-

Logout :-

Logout Error:-

Login :-

  • *Apple only returns the user's information the first time the user authorizes the app. Persist this information from your app; subsequent authorization requests won’t contain this information.

  • Once you have the user’s token(idToken), you can decode it using any general-purpose JWT library to retrieve user's information.

Wordpress plugin: We have wordpress plugin for social login integration. Kindly find webtonative wordpress plugin from below link. https://wordpress.org/plugins/webtonative/

Shopify plugin: We have shopify plugin for social login integration. https://apps.shopify.com/social-login-webtonative

Note:-

Apple Login is available only in iOS.

Last updated