
Security News
Rspack Introduces Rslint, a TypeScript-First Linter Written in Go
Rspack launches Rslint, a fast TypeScript-first linter built on typescript-go, joining in on the trend of toolchains creating their own linters.
facebook-account-kit
Advanced tools
This gem aims to facilitate the communication with Facebook's Account Kit. It implements the server side described in the official docs.
As of now it's assuming you have enabled Require app secret
in your Account Kit page.
It only uses the core modules available as part of Ruby (so nothing too crazy in here 😬...)
Add this line to your application's Gemfile:
gem 'facebook-account-kit'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install facebook-account-kit
Somewhere in your application (probably as part of a new initializer
) you should add the following:
Facebook::AccountKit.config do |c|
c.account_kit_version = 'v1.0' # or any other valid account kit api version
c.account_kit_app_secret = 'your account kit secret'
c.facebook_app_id = 'your facebook app id'
end
All of that information you can find as part of your Facebook app's dashboard
and account kit
pages.
The process of communicating with Facebook is divided into two steps.
During the first one you will use the code
(AKA authorization code
) that the client provided in exchange for an access_token
:
client_code = params[:code] # this depends on how your controller was implemented
token_exchanger = Facebook::AccountKit::TokenExchanger.new(client_code)
access_token = token_exchanger.fetch_access_token
...and with that access token you can request for the user information:
user = Facebook::AccountKit::UserAccount.new(access_token)
user.fetch_user_info
There are different targets in the Makefile to help you to run the tests:
make test
make test.unit
make test.integration
Bug reports and pull requests are welcome on GitHub at https://github.com/nicholaspufal/facebook-account-kit
FAQs
Unknown package
We found that facebook-account-kit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Rspack launches Rslint, a fast TypeScript-first linter built on typescript-go, joining in on the trend of toolchains creating their own linters.
Security News
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.