# lookup-oauth-js

> Customized version of OAuth.io JavaScript SDK

Latest version **0.4.4** (published 2018-03-15) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install lookup-oauth-js
pnpm add lookup-oauth-js
yarn add lookup-oauth-js
bun add lookup-oauth-js
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.4 |
| Published | 2018-03-15 |
| First published | 2018-03-15 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 230.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | oauth.io |
| Maintainers | charley_vince |

## Links

- npm: https://www.npmjs.com/package/lookup-oauth-js
- Repository: https://github.com/pmstss/lookup-oauth-js
- Homepage: https://github.com/pmstss/lookup-oauth-js#readme
- Issues: https://github.com/pmstss/lookup-oauth-js/issues
- npm.io page: https://npm.io/package/lookup-oauth-js

## Dependencies (1)

- [q](https://npm.io/package/q.md) ^1.0.1

## Recent versions

- 0.4.4 (latest) — 2018-03-15

## README

lookup-oauth-js
===============

Customized version of [OAuth.io](https://oauth.io) [JavaScript SDK](https://github.com/oauth-io/oauth-js). 

### Customization changes
- custom server url (https://lookup-signin.herokuapp.com) in Grunfile.js envify section
- jquery-lite is excluded from dist bundle (dist/oauth.js) as well as redundant [Q](https://github.com/kriskowal/q), which greatly decreased file size (uncompressed: 218 kB -> 52 kB). 

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](http://requirejs.org/) config can look like:

```javascript
{
    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:

```javascript
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](http://oauth.io/#/docs)

---
_Source: https://npm.io/package/lookup-oauth-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
