Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrelmlins/svelte-facebook-login
Facebook Login Component to Svelte
https://github.com/andrelmlins/svelte-facebook-login
facebook library login svelte
Last synced: 1 day ago
JSON representation
Facebook Login Component to Svelte
- Host: GitHub
- URL: https://github.com/andrelmlins/svelte-facebook-login
- Owner: andrelmlins
- License: mit
- Created: 2020-01-24T00:44:19.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T14:13:18.000Z (almost 2 years ago)
- Last Synced: 2024-06-11T18:06:17.255Z (5 months ago)
- Topics: facebook, library, login, svelte
- Language: Svelte
- Homepage: https://svelte-facebook-login.netlify.com/
- Size: 625 KB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-svelte - Svelte Facebook Login - Realiza login com o facebook. (UI Componentes / Comunidade Global)
README
# Svelte Facebook Login
[![npm version](https://badge.fury.io/js/svelte-facebook-login.svg)](https://www.npmjs.com/package/svelte-facebook-login) • [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/andrelmlins/svelte-facebook-login/blob/master/LICENSE) • [![Build Status](https://travis-ci.com/andrelmlins/svelte-facebook-login.svg?branch=master)](https://travis-ci.com/andrelmlins/svelte-facebook-login) • [![Netlify Status](https://api.netlify.com/api/v1/badges/bba67805-d9ab-4609-9027-a86842c5b6bb/deploy-status)](https://app.netlify.com/sites/svelte-github-login/deploys) • [![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/andrelmlins/svelte-facebook-login.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/andrelmlins/svelte-facebook-login/context:javascript)
Facebook Login Component to Svelte
## Installation
```
npm i svelte-facebook-login
// OR
yarn add svelte-facebook-login
```**version with typescript**
```
npm i svelte-facebook-login@next
// OR
yarn add svelte-facebook-login@next
```Note: to use this library in sapper, install as devDependency. See the [link](https://github.com/sveltejs/sapper-template#using-external-components).
## Demo [Link](https://svelte-facebook-login.netlify.com/)
Local demo:
```
git clone https://github.com/andrelmlins/svelte-facebook-login.git
cd svelte-facebook-login
npm install && npm run dev
```## Examples
An example of how to use the library:
```js
import FacebookLogin from "svelte-facebook-login";
console.log(params)}
on:error={error => console.log(error)}
let:onLogin
>
Facebook Login```
## Properties
Component props:
| Prop | Type | Description |
| ------------ | ------ | --------------------------------------------------------------------------- |
| clientId | string | Client ID for Facebook OAuth application |
| state | string | Value created by the maintenance state between the request and the callback |
| redirectUri | string | Registered redirect URI for Facebook OAuth application |
| responseType | string | Grant type the application wants to use |
| scope | string | A space-delimited list of permissions that the application requires |
| pollInterval | number | Login success analysis interval |## Events
| Prop | Type | Description |
| ------- | ---- | ----------------- |
| success | func | Call with success |
| error | func | Call with error |
| request | func | Call with offset |## Slot Properties
| Prop | Type | Description |
| ------- | ---- | -------------- |
| onLogin | func | Call for login |## NPM Statistics
Download stats for this NPM package
[![NPM](https://nodei.co/npm/svelte-facebook-login.png)](https://nodei.co/npm/svelte-facebook-login/)
## License
Svelte Facebook Login is open source software [licensed as MIT](https://github.com/andrelmlins/svelte-facebook-login/blob/master/LICENSE).