npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@logto/connector-facebook

v1.4.0

Published

Facebook web connector implementation.

Downloads

523

Readme

Facebook connector

The official Logto connector for Facebook social sign-in.

Table of contents

Get started

The Facebook connector provides a concise way for your application to use Facebook's OAuth 2.0 authentication system.

Register a Facebook developer account

Register as a Facebook Developer if you don't already have one

Set up a Facebook app

  1. Visit the Apps page.
  2. Click your existing app or create a new one if needed.
    • The selected app type is up to you, but it should have the product Facebook Login.
  3. On the app dashboard page, scroll to the "Add a product" section and click the "Set up" button on the "Facebook Login" card.
  4. Skip the Facebook Login Quickstart page, and click the sidebar -> "Products" -> "Facebook Login" -> "Settings".
  5. In the Facebook Login Settings page, fill ${your_logto_origin}/callback/${connector_id} in the "Valid OAuth Redirect URIs" field. The connector_id can be found on the top bar of the Logto Admin Console connector details page. E.g.:
    • https://logto.dev/callback/${connector_id} for production
    • https://localhost:3001/callback/${connector_id} for testing in the local environment
  6. Click the "Save changes" button at the bottom right corner.

Compose the connector JSON

  1. In the Facebook app dashboard page, click the sidebar -> "Settings" -> "Basic".
  2. You will see the "App ID" and "App secret" on the panel.
  3. Click the "Show" button following the App secret input box to copy its content.
  4. Fill out the Logto connector settings:
    • Fill out the clientId field with the string from App ID.
    • Fill out the clientSecret field with the string from App secret.
    • Fill out the scope field with a comma or space separated list of permissions in string. If you do not specify a scope, the default scope is email,public_profile.

Test sign-in with Facebook's test users

You can use the accounts of the test, developer, and admin users to test sign-in with the related app under both development and live app modes.

You can also take the app live directly so that any Facebook user can sign in with the app.

  • In the app dashboard page, click the sidebar -> "Roles" -> "Test Users".
  • Click the "Create test users" button to create a testing user.
  • Click the "Options" button of the existing test user, and you will see more operations, e.g., "Change name and password".

Publish Facebook sign-in settings

Usually, only the test, admin, and developer users can sign in with the related app under development mode.

To enable normal Facebook users sign-in with the app in the production environment, you maybe need to switch your Facebook app to live mode, depending on the app type. E.g., the pure business type app doesn't have the "live" switch button, but it won't block your use.

  1. In the Facebook app dashboard page, click the sidebar -> "Settings" -> "Basic".
  2. Fill out the "Privacy Policy URL" and "User data deletion" fields on the panel if required.
  3. Click the "Save changes" button at the bottom right corner.
  4. Click the "Live" switch button on the app top bar.

Config types

| Name | Type | |--------------|--------| | clientId | string | | clientSecret | string | | scope | string |

References