# google-auth-simplify

> It simplifies google-auth-library in 3 steps. 1- Generate auth url, 2- Get auth token, 3- Get user info.

Latest version **1.0.4** (published 2020-10-20) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install google-auth-simplify
pnpm add google-auth-simplify
yarn add google-auth-simplify
bun add google-auth-simplify
```

## 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 | 1.0.4 |
| Published | 2020-10-20 |
| First published | 2020-10-20 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 11.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Saud Chougle |
| Maintainers | saud_chougle |
| Keywords | google-auth-simplify, google-auth-library, google, api, google apis, client, client library |

## Links

- npm: https://www.npmjs.com/package/google-auth-simplify
- Repository: https://github.com/chouglesaud/google-auth-simplify
- Homepage: https://github.com/chouglesaud/google-auth-simplify#readme
- Issues: https://github.com/chouglesaud/google-auth-simplify/issues
- npm.io page: https://npm.io/package/google-auth-simplify

## Dependencies (1)

- [google-auth-library](https://npm.io/package/google-auth-library.md) ^6.1.1

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2020-10-20
- 1.0.3 — 2020-10-20
- 1.0.2 — 2020-10-20
- 1.0.1 — 2020-10-20
- 1.0.0 — 2020-10-20

## README

# google-auth-simplify
It simplifies ```google-auth-library``` in 3 steps:
1. Generate auth URL.
2. Get auth token. 
3. Get user info.

## Install
```
npm i google-auth-simplify
```
## Example
```js
const express = require('express');
const { GoogleAuth } = require('google-auth-simplify');

const app = express();

const googleAuth = new GoogleAuth({
  clientId: GOOGLE_CLIENT_ID,
  clientSecret: GOOGLE_CLIENT_SECRET,
  redirectURI: GOOGLE_REDIRECT_URI,
});

app.get('/login', (req, res) => {
  const authUrl = googleAuth.generateAuthUrl();// STEP 1
  res.redirect(authUrl);
});

app.get('/google_redirect_url', async (req, res) => {
  const code = req.query['code'];
  const authToken = await googleAuth.getAuthToken(code);// STEP 2
  const profile = await googleAuth.getUserInfo(authToken);// STEP 3
  res.json({profile});
});

app.listen(3000, () => {
  console.log('server started:.:.:');
});

```

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