Code Monkey home page Code Monkey logo

cordova-outsystems-sociallogins's Introduction

cordova-outsystems-sociallogins

This plugin is SUPPORTED by OutSystems. Customers entitled to Support Services may obtain assistance through Support.

Installation

cordova plugin add <path-to-repo-local-clone>

It is also possible to install via repo url directly

cordova plugin add https://github.com/OutSystems/cordova-outsystems-sociallogins.git

Supported Platforms

  • Android
  • iOS

Methods

Login Data returned by every method (JSON)

{
  "id": "EXAMPLE_ID",
  "email": "EXAMPLE_EMAIL",
  "firstName": "EXAMPLE_FIRST_NAME",
  "lastName": "EXAMPLE_LAST_NAME",
  "token": "EXAMPLE_ACCESS_TOKEN",
  "picture": "EXAMPLE_PROFILE_PICTURE"
}

OSSocialLogins.loginApple

Starts the login process using Apple as the login provider. Returns the login date corresponding to the Apple account used to sign in through the loginSuccess callback. If there is an error, the loginError callback is called with an error object containing both error.code and error.message.

cordova.plugins.OSSocialLogins.loginApple(loginSuccess, loginError, state, clientId, redirectUrl);

Parameters

  • loginSuccess: The callback that is passed the login data after the login with Apple is successful.

  • loginError: The callback that executes if an error occurs.

  • state: A UUID that identifies the login request.

  • clientId: The Identifier of the Sign-In with Apple Configuration on Apple Developer.

  • redirectUrl: The redirect URL of the Sign-In with Apple Configuration on Apple Developer.


OSSocialLogins.loginGoogle

Starts the login process using Google as the login provider. Returns the login data corresponding to the Google account used to sign in through the loginSuccess callback. If there is an error, the loginError callback is called with an error object containing both error.code and error.message.

cordova.plugins.OSSocialLogins.loginGoogle(loginSuccess, loginError, clientId, redirectUrl);

Parameters

  • loginSuccess: The callback that is passed the login data after the login with Google is successful.

  • loginError: The callback that executes if an error occurs.

  • clientId: The clientId of the Sign-In with Google configuration on the Google Cloud Platform.

  • redirectUrl: The redirect URL of the Sign-In with Google configuration on the Google Cloud Platform.


OSSocialLogins.loginFacebook

Starts the login process using Facebook as the login provider. Returns the login data corresponding to the Apple account used to sign in through the loginSuccess callback. If there is an error, the loginError callback is called with an error object containing both error.code and error.message.

cordova.plugins.OSSocialLogins.loginFacebook(loginSuccess, loginError);

Parameters

  • loginSuccess: The callback that is passed the login data after the login with Facebook is successful.

  • loginError: The callback that executes if an error occurs.


OSSocialLogins.loginLinkedIn

Starts the login process using LinkedIn as the login provider. Returns the login data corresponding to the LinkedIn account used to sign in through the loginSuccess callback. If there is an error, the loginError callback is called with an error object containing both error.code and error.message.

cordova.plugins.OSSocialLogins.loginLinkedIn(loginSuccess, loginError, state, clientId, redirectUrl);

Parameters

  • loginSuccess: The callback that is passed the login data after the login with LinkedIn is successful.

  • loginError: The callback that executes if an error occurs.

  • state: A UUID that identifies the login request.

  • clientId: The clientId of the Sign-In with LinkedIn configuration on LinkedIn for Developers.

  • redirectUrl: The redirect URL of the Sign-In with LinkedIn configuration on LinkedIn for Developers.


Errors (for both Android and iOS)

Code Message Reason
100 There was an error signing in with Apple An error that we couldn't identify occurred while signing in with Apple.
101 The login was cancelled User cancelled the login.
103 Invalid token Token used for Apple token validation is invalid.
104 There are input parameters missing User-caused error due to missing parameters.
105 User id missing User ID for Apple is missing in the login response.
106 Access token missing Access token for Apple is missing in the login response.
200 There was an error signing in with Google An error that we couldn't identify occurred while signing in with Google.
201 Missing Google Sign In configuration Google sign-in configuration for iOS not found.
201 Access token missing Access token for Google in missing in the login response.
202 User id missing User ID for Google is missing in the login response.
201 Google configuration not valid Google sign-in for iOS configuration is not valid.
300 There was an error signing in with Facebook An error that we couldn't identify occurred while signing in with Facebook.
302 Some error occurred while signing in with Facebook as no token was found. Access token for Facebook is missing in the login response.
303 No results were returned while signing in with Facebook No results found in the login response.
304 Couldn't fetch information for all parameters requested Access to some Facebook account data is not allowed.
305 There was a problem while request the user's data on Facebook An error that we couldn't identify occurred while requesting user data.
399 The configurations for Facebook were not properly set Facebook login configuration is not valid.
400 There was an error signing in with LinkedIn An error that we couldn't identify occurred while signing in with LinkedIn.
401 There was an issue while creating the sign in request for LinkedIn Error in creating the sign in request for LinkedIn in iOS.
402 There was an issue while creating the web authentication session for LinkedIn Error in creating the web authentication session for LinkedIn in iOS.
403 Couldn't fetch information for all parameters requested Access to some LinkedIn account data is not allowed in iOS.
404 Access token missing Access token for LinkedIn is missing in the login response.
405 User id missing User ID for LinkedIn is missing in the login response.
499 The configuration for LinkedIn were not properly set LinkedIn login configuration is not valid is iOS.

cordova-outsystems-sociallogins's People

Contributors

alexgerardojacinto avatar carlscorrea avatar it-mikes avatar nflsilva avatar os-martacarlos avatar os-ricardomoreirasilva avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-outsystems-sociallogins's Issues

Social Login plugin replaced default deeplink URL scheme

We've been digging for a while why our app suddenly stopped responding to the default custom URL scheme. According to the OutSystems docs the URL scheme should be set to the value specified in the App Identifier field under Module / Distribute / Native Platform / iOS.

When digging through the source code I found that this plugin actually sets that value in the iOSCopyPreferences.js hook. It fetches a JSON config (endpoint specified in the app's Extensibility Configurations) from the SocialLoginConfigurator and uses the value found under app_deeplink.url_scheme.

If I understand the code correct it looks like the hook replaces the existing array for the DeepLinkScheme (CFBundleURLName), with a new array instead of pushing the value onto the existing one.

Do you have any suggestions how to solve this issue without updating the source code of this plugin?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.