1.0.0 • Published 3 months ago

social-auth-js v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

Social Auth JS

Intends to provide reusable components that will allow you to access the login flow for several social platforms, some will work as standalone frontend components, others will need some type of backend support.

Platforms
  • Facebook
  • Google
  • Github
  • Instagram
  • Twitter
  • Bitbucket
  • Linkedin
  • Vkontakte
  • Live

Install

Using NPM

npm i social-auth-js

or using Yarn

yarn add social-auth-js

Using

import SocialAuthJS from 'social-auth-js'
import axios from 'axios'

const socialAuth = new SocialAuthJS(axios, {
    providers: {
      facebook: {
        clientId: 'YOUR_CLIENT_ID',
        redirectUri: 'YOUR_REDIRECT_URL',
      },
      google: {
        clientId: 'YOUR_CLIENT_ID',
        redirectUri: 'YOUR_REDIRECT_URL',
      },
    },
 });
 socialAuth.authenticate('facebook').then((res) => {
     // res will return callback token
     // call api to verify token and get user information
     // If you are using Laravel, you can easily use https://laravel.com/docs/10.x/socialite for authenticate
 });
1.0.0

3 months ago

0.0.5

7 months ago

0.0.4

7 months ago

0.0.3

7 months ago

0.0.2

7 months ago

0.0.1

7 months ago