Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.