# @rohit-chouhan/authjs

> Easy Social Media Login Authentication integrator

Latest version **2.0.0** (published 2020-09-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @rohit-chouhan/authjs
pnpm add @rohit-chouhan/authjs
yarn add @rohit-chouhan/authjs
bun add @rohit-chouhan/authjs
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2020-09-07 |
| First published | 2020-09-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Rohit Chouahn |
| Maintainers | rohit-chouhan |
| Keywords | facebook login,  login,  social login,  athentication,  login with |

## Links

- npm: https://www.npmjs.com/package/@rohit-chouhan/authjs
- Repository: https://github.com/rohit-chouhan/AuthJs
- Homepage: https://github.com/rohit-chouhan/AuthJs#readme
- Issues: https://github.com/rohit-chouhan/AuthJs/issues
- npm.io page: https://npm.io/package/@rohit-chouhan/authjs

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 2.0.0 (latest) — 2020-09-07
- 1.0.1 — 2020-09-07
- 1.0.0 — 2020-09-07

## README

# AuthJs
Easy Social Media Login Authentication integrator

![authjs](https://i.ibb.co/FXCn5tR/authjs.jpg)

#### CDN
`authjs.min.js`
```sh
https://cdn.jsdelivr.net/npm/@rohit-chouhan/authjs/authjs.min.js
```

`authjs.js`
```sh
https://cdn.jsdelivr.net/npm/@rohit-chouhan/authjs/authjs.js
```

### Installation with NPM

```sh
$ npm install @rohit-chouhan/authjs
```

### Documentation

Method | Use
---|---
authjs.set('<fbappid>') | First step of AuthJs, to Initilize AuthJs for Facebook Login
authjsinit() | Function which will exicute automatically when login success
authjs.login() | Exicute the code for Login with Facebook
authjs.logout() | Logout Facebook from your Project
authjs.staus() | Debug & Check Status of AuthJs
authget.obj | Get data `id, name, profile, accessToken`

### Example Code

```html
<!DOCTYPE html>
<html>
    <head>
        <title>AuthJs Simple Page</title>
        <script src="https://cdn.jsdelivr.net/npm/@rohit-chouhan/authjs/authjs.min.js"></script>
    </head>
    <body>
        <script>
            //Set Facebook APP ID
            authjs.set("89017650134XXXX");

            //Manually Calling Function
            function authjsrun() {
                console.log(authget.id);
                console.log(authget.name);
                console.log(authget.profile);
                console.log(authget.accessToken);
            }

            //Auto Exicute When Login is Success
            function authjsinit() {
                alert("Welcome" + authget.name);
            }
        </script>
        <button onclick="authjsrun()">Get All Info</button>
        <button onclick="authjs.login()">Login</button>
        <button onclick="authjs.logout()">Logout</button>
        <button onclick="authjs.status()">Status</button>
    </body>
</html>

```

### Developers
![Rohit](http://graph.facebook.com/100004453384015/picture?type=square)\
Developed by [Rohit Chouhan](https://rohitchouhan.com),  MIT License

---
_Source: https://npm.io/package/@rohit-chouhan/authjs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
