Angular Social Login (ngSocialLogin)
Angular Social Login module (for PhoneGap/Cordova)
Supported sites:
Requirements
Complete functionality only available in PhoneGap/Cordova applications with inAppBrowser plugin (https://github.com/apache/cordova-plugin-inappbrowser) installed.
Installation
via npm
npm install angular-social-login
via bower
bower install angular-social-login
configure installation
Include JS file:
Then include ngSocialLogin
as a dependency for your app:
angular;
Configuration
Example
app;
Usage
Methods
$googleDefaultsProvider.useConfig(config)
$facebookDefaultsProvider.useConfig(config)
$googleAuth.getAuthURL(authConfig)
$googleAuth.getAccessToken(authCode, customConfig, customURL)
$facebookAuth.getAuthURL(authConfig)
$socialAuthCordova.loginGoogle(authConfig, customConfig, customURL)
$socialAuthCordova.loginFacebook(authConfig, customConfig, customURL)
$socialAuthCordov.login(site, authConfig, customConfig, customURL)
Params
- config/authConfig:
client_id: YOUR CLIENT ID redirect_uri: REDIRECT URI response_type: RESPONSE TYPE scope: SCOPE
- customConfig: override authConfig for accessToken request (e.g. client_secret, grant_type)
- customURL: custom URL to call access token requests (e.g. server proxy)
Example
$socialAuthCordova; $socialAuthCordova;