Coder Social home page Coder Social logo

biessek / vue-facebook-account-kit Goto Github PK

View Code? Open in Web Editor NEW
13.0 0.0 3.0 137 KB

DEPRECATED - Vue wrapper to facebook account kit: https://www.accountkit.com/

License: MIT License

JavaScript 84.46% Vue 15.54%
javascript vue2 facebook-account-kit passwordless-login archived obsolete deprecated

vue-facebook-account-kit's Introduction

DEPRECATED AccountKit

Facebook Account Kit is being deprecated: read more https://developers.facebook.com/docs/accountkit/

npm vue2

A Vue.js Plugin

Installation

npm install --save vue-facebook-account-kit

Usage

Bundler (Webpack, Rollup)

import Vue from 'vue'
import AccountKit from 'vue-facebook-account-kit'
Vue.use(AccountKit)

Browser

Recomended: Use the facebook version directly instead.

<!-- Include after Vue -->
<!-- Local files -->
<script src="vue-facebook-account-kit/dist/vue-facebook-account-kit.js"></script>

<!-- From CDN -->
<script src="https://unpkg.com/vue-facebook-account-kit"></script>

Small example

https://github.com/biessek/fb-account-kit-example

Development

Launch visual tests

npm run dev

Launch Karma with coverage

npm run dev:coverage

Build

Bundle the js of to the dist folder:

npm run build

Publishing

The prepublish hook will ensure dist files are created before publishing. This way you don't need to commit them in your repository.

# Bump the version first
# It'll also commit it and create a tag
npm version
# Push the bumped package and tags
git push --follow-tags
# Ship it ๐Ÿš€
npm publish

License

MIT

vue-facebook-account-kit's People

Contributors

batbayar-su avatar biessek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vue-facebook-account-kit's Issues

Can't change loginType

Problem:
In the example: https://github.com/biessek/fb-account-kit-example
when I add a button "login by Email", I need to change loginType prop in the component.
If I directly change it, Vue throw a warning that I should use data method to change prop dynamically.
If I use data and v-bind:loginType = loginType on the component's props, it doesn't reload the component, it only changed if I press button again.

Solutions:
There are 2 options:

  • Create watcher for the component.
  • Modify the login method to accept 3 variable, the first is loginType.

New version 0.1.1 not working

What Happen

The new version 0.1.1 show the error This dependency was not found vue-facebook-account-kit in ./plugins/vue-facebook-account-kit.js. To install it, you can run: npm install --save vue-facebook-account-kit

I've already installed and still not solve when install again. When I switch to version 0.1.0, everything work well again expect the display cannot change bug.

How to initialize?

AccountKit.login( 'PHONE', {countryCode: countryCode, phoneNumber: phoneNumber}, // will use default values if not specified loginCallback );
is error

Cannot change display to modal

I've tried changing display property to modal like below, but none of these works and it open as popup every time. Any idea ?

<facebook-account-kit
   display="modal"
>
this.$refs.accountKit.login({
   display: "modal"
})

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.