Socket
Book a DemoInstallSign in
Socket

lookup-y-oauth-js

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lookup-y-oauth-js

Customized version of OAuth.io JavaScript SDK

latest
npmnpm
Version
0.5.6
Version published
Maintainers
1
Created
Source

lookup-oauth-js

Customized version of OAuth.io JavaScript SDK.

Customization changes

The last change is done in pretty clumsy way (will be appreciate for more elegant hint): in core.coffee getJquery is modified to return global jQuery variable - so it works in assumption, that global jQuery is available.

If you are using RequireJS config can look like:

{
    shim: {
        'jquery': {
            exports: 'jQuery'
        },
        'oauth-js': {
            deps: ['jquery'],
            exports: 'OAuth'
        }
    },
    paths: {
        'jquery': 'libs/jquery/dist/jquery',
        'oauth-js': 'libs/lookup-oauth-js/dist/oauth'
    }
}

...and futher using like:

define(['oauth-js'], function (OAuth) {
    OAuth.initialize(YOUR_OAUTHD_KEY);
    OAuth.popup(PROVIDER_NAME).done(function (result) {
        console.log('result: %o', result);
        result.me().done(function (data) {
            console.log('data: %o', data);
            alert('Hello ' + data.name + '!');
        }).fail(function (err) {
            console.log(err);
        });
    }).fail(function (err) {
        console.log(err);
    });
});

Versions

2015-08-13: initital 0.4.3 version 2015-08-13: 0.4.4 version: removing Q dependency; dist file size decreased (uncompressed: 115 kB -> 52 kB)

License

This SDK is published under the Apache2 License.

More information in oauth.io documentation

FAQs

Package last updated on 12 Jun 2019

Did you know?

Socket

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.

Install

Related posts