npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-sso

v0.2.13

Published

cordova-plugin-sso

Downloads

8

Readme

cordova-plugin-sso

What ?

If you use this plugin, you can be available for realizing SSO (Single Sign On) at Twitter, Facebook and LINE

Install

This plugin is using CocoaPods. Before install this plugin, please install CocoaPods

$ gem install cocoapods
$ pod setup

and Install

$ cordova plugin 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.3">
    <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="[clinet_id]" />
    <variable name="GOOGLE_REVERSED_CLIENT_ID" value="[reverse_clinet_id]" />
    <!-- Google signin Android-->
    <variable name="GOOGLE_WEB_OAUTH_CLIENT_ID" value="[outh clinet]"/>
</plugin>

this plugin

Service Settings

LINE

  • To get Signiture, you execute below code
$ keytool -exportcert -alias androiddebugkey -keystore .keystore | openssl sha1 -binary | openssl md5

Twitter

Facebook

for iOS

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.

for Android

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

Usage

Available Service

  • Twitter
  • Line
  • Facebook

Login Example

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);
    }
  );
}

Available Parameter

Every service has below parameters

  • name
  • userId
  • token
  • image

Optional parameters below

Logout

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);
    }
  );
}

UPDATING

0.2.1 (only iOS update)

iOS
  • Using cocoapods

  • Updating all iOS SDK (Twitter Facebook LINE)

    • TwitterKit: 3.4.0
    • FBSDKLoginKit: 4.38
    • LineSDKSwift: 5.0
  • Using NotificationCenter and Removing app delegat

  • remove Google signin

Android
  • remove Google signin

0.2.2

Google sign in (android and ios)

0.2.3

remove dependency of cordova plugin cocoapods

0.2.4

bugfix facebook login