@salte-auth/google

A Salte Auth provider for authenticating with Google!

Usage no npm install needed!

<script type="module">
  import salteAuthGoogle from 'https://cdn.skypack.dev/@salte-auth/google';
</script>

README

A Salte Auth provider for authenticating with Google!

DocsDemo

NPM Version NPM Downloads CI Build Coveralls

semantic-release

Install

$ npm install @salte-auth/google

Usage

import { SalteAuth } from '@salte-auth/salte-auth';
import { Google } from '@salte-auth/google';
import { Redirect } from '@salte-auth/redirect';

/* 
 * Feel free to try out Salte Auth with this configuration!
 * 
 * It should work with the following domains:
 * - localhost:8081
 */
const auth = new SalteAuth({
  providers: [
    new Google({
      clientID: '680805279527-a1fpj4j0q31e58qstvih9p2rljsdadp9.apps.googleusercontent.com',
      responseType: 'code',
    })
  ],

  handlers: [
    new Redirect({
      default: true
    })
  ]
});

auth.login('google');