@healerlab/vue3-facebook-login

Powerful, lightweight Facebook login component for Vue 3
28,750 13
Install
npm install @healerlab/vue3-facebook-login
Latest Version:0.1.7
Vue:3
License:MIT
Last Updated:Feb 26, 2024
Links: GitHub  ·  npm
Maintainer: healernguyen

Vue 3 facebook login

npm npm GitHub

Demo

Demo and docs

Installation

Prerequisites

To get started, you can install vue3-facebook-login with:

npm i @healerlab/vue3-facebook-login

with pnpm:

pnpm add @healerlab/vue3-facebook-login

with yarn:

yarn add @healerlab/vue3-facebook-login

Usage

See the FaceBook Graph API for more information about scope.

Import the component and register it locally in your Vue component:

<script setup>
import { HFaceBookLogin } from '@healerlab/vue3-facebook-login';

const onSuccess = (response) => {
  // get your auth token and info
}

const onFailure = () => {
  // logic if auth failed
}
</script>

Use the component in your template:

<HFaceBookLogin 
  v-slot="fbLogin" 
  app-id="391069538168549" 
  @onSuccess="onSuccess" 
  @onFailure="onFailure"
  scope="email,public_profile"
  fields="id,name,email,first_name,last_name,birthday"
>
  <span @click="fbLogin.initFBLogin" class="fb-button">Login with facebook</span>
</HFaceBookLogin>

This is style for this example and not required, you can change and customize it to match your use-case:

.fb-button {
  display: inline-block;
  margin: 10px 0 10 0;
  color: white;
  background-color: #1967d2;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
}

See the Vue3 FaceBook Login page for more information.

Related Packages

seeroad-libs

A collection of utility classes

1,068
@orderprotection/vue

Order Protection components implemented in Vue

25,773
@publishvue/vue3complib

Vue 3 component library.

12,924 0
supre-ui

A UI library for Vue2 applications

10,417

Version History

Version Released License
0.1.7 MIT
0.1.6 MIT
0.1.5 MIT
0.1.4 MIT
0.1.2 MIT