Giter Club home page Giter Club logo

svelte-facebook-login's Introduction

Svelte Facebook Login

npm versionLicense: MITBuild StatusNetlify StatusLanguage grade: 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.

Demo Link

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:

<script>
  import FacebookLogin from "svelte-facebook-login";
</script>

<FacebookLogin
  clientId="XXX"
  state="1"
  redirectUri="http://localhost:5000/"
  on:success={params => console.log(params)}
  on:error={error => console.log(error)}
  let:onLogin
>
  <button on:click={onLogin}>Facebook Login</button>
</FacebookLogin>

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

License

Svelte Facebook Login is open source software licensed as MIT.

svelte-facebook-login's People

Contributors

andrelmlins avatar dependabot[bot] avatar ceifa avatar

Stargazers

Roman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.