Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
cordova-plugin-sso
Advanced tools
If you use this plugin, you can be available for realizing SSO (Single Sign On) at Twitter, Facebook and LINE
This plugin is using CocoaPods. Before install this plugin, please install CocoaPods
$ gem install cocoapods
$ pod setup
and Install
$ cordova plguin add cordova-plugin-sso --variable TWITTER_KEY=XXXX --variable TWITTER_SECRET=XXXX
And add config.xml below code
<plugin name="cordova-plugin-sso" spec="0.2.2">
<variable name="LINE_BUNDLE_ID" value="line3rdp.[YOUR BUNDLE ID]" />
<variable name="LINE_CHANNEL_ID" value=[LINE_CHANNLE_ID] />
<variable name="TWITTER_KEY" value=[Twitter Consumer Key] />
<variable name="TWITTER_SECRET" value=[Twitter Consumer Secret] />
<variable name="FACEBOOK_APP_ID" value=[Facebook app id] />
<variable name="FACEBOOK_APP_NAME" value=[Facebook app name] />
<!-- Google signin iOS-->
<variable name="GOOGLE_CLIENT_ID" value="426376846835-mlvbbgm7njiaqnt9d9k1i3v1tbb3sieq.apps.googleusercontent.com" />
<variable name="GOOGLE_REVERSED_CLIENT_ID" value="com.googleusercontent.apps.426376846835-mlvbbgm7njiaqnt9d9k1i3v1tbb3sieq" />
<!-- Google signin Android-->
<variable name="GOOGLE_WEB_OAUTH_CLIENT_ID" value="426376846835-09m1vk5faq5m480ov06lbsedpbuldjpj.apps.googleusercontent.com"/>
</plugin>
this plugin
$ keytool -exportcert -alias androiddebugkey -keystore .keystore | openssl sha1 -binary | openssl md5
To get client id & reversed client id, you have to register your project to Google firebase console.
https://developers.google.com/identity/sign-in/ios/sdk/
As regster your appliction, you get GoogleService-Info.plist.
You can see client id & reversed client id on the text editor.
https://developers.google.com/mobile/add?platform=android&cntapi=signin
When you regster your appliction, you have to set the SHA1 fingerprint.
keytool -exportcert -keystore <path-to-debug-or-production-keystore> -list -v -alias <alias-name>
If your project is only debug, only you have to do is entering below code on the console.
keytool -exportcert -keystore ~/.android/debug.keystore -list -v
if (window.sso) {
sso.twitter.login(function(result) {
// success
var data = {
name: result.name,
id: result.userId,
token: result.token,
image: result.image
};
}, function(error) {
// error
console.log(error);
});
}
Every service has below parameters
Optional parameters below
If you have been logined once, the accessToken was saved in the device. So if you want to get the Token, profile, or etc.. from the beginning, you have to execute 'logout' method.
if (window.sso) {
sso.twitter.logout(function(message) {
// success
console.log(message) // -> display logout
}, function(error) {
// error
console.log(error);
});
}
Using cocoapods
Updating all iOS SDK (Twitter Facebook LINE)
Using NotificationCenter and Removing app delegat
remove Google signin
Google sign in (android and ios)
FAQs
cordova-plugin-sso
The npm package cordova-plugin-sso receives a total of 1 weekly downloads. As such, cordova-plugin-sso popularity was classified as not popular.
We found that cordova-plugin-sso demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.