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-google

v1.3.0

Published

Google web connector implementation.

Downloads

1,057

Readme

Google connector

The Google connector provides a succinct way for your application to use Google’s OAuth 2.0 authentication system.

Table of contents

Set up a project in the Google API Console

  • Visit the Google API Console and sign in with your Google account.
  • Click the Select a project button on the top menu bar, and click the New Project button to create a project.
  • In your newly created project, click the APIs & Services to enter the APIs & Services menu.

Configure your consent screen

Configure and register your application

  • On the left APIs & Services menu, click the OAuth consent screen button.
  • Choose the User Type you want, and click the Create button. (Note: If you select External as your User Type, you will need to add test users later.)

Now you will be on the Edit app registration page.

Edit app registration

Config OAuth consent screen

  • Follow the instructions to fill out the OAuth consent screen form.
  • Click SAVE AND CONTINUE to continue.

Config scopes

  • Click ADD OR REMOVE SCOPES and select ../auth/userinfo.email, ../auth/userinfo.profile and openid in the popup drawer, and click UPDATE to finish. It is recommended that you consider adding all the scopes you may use, otherwise some scopes you added in the configuration may not work.
  • Fill out the form as you need.
  • Click SAVE AND CONTINUE to continue.

Add test users (External user type only)

  • Click ADD USERS and add test users to allow these users to access your application while testing.
  • Click SAVE AND CONTINUE to continue.

Now you should have the Google OAuth 2.0 consent screen configured.

Obtain OAuth 2.0 credentials

  • On the left APIs & Services menu, click the Credentials button.
  • On the Credentials page, click the + CREATE CREDENTIALS button on the top menu bar, and select OAuth client ID.
  • On the Create OAuth client ID page, select Web application as the application type.
  • Fill out the basic information for your application.
  • Click + Add URI to add an authorized domain to the Authorized JavaScript origins section. This is the domain that your logto authorization page will be served from. In our case, this will be ${your_logto_origin}. e.g.https://logto.dev.
  • Click + Add URI in the Authorized redirect URIs section to set up the Authorized redirect URIs, which redirect the user to the application after logging in. In our case, this will be ${your_logto_endpoint}/callback/${connector_id}. e.g. https://logto.dev/callback/${connector_id}. The connector_id can be found on the top bar of the Logto Admin Console connector details page.
  • Click Create to finish and then you will get the Client ID and Client Secret.

Configure your connector

Fill out the clientId and clientSecret field with Client ID and Client Secret you've got from OAuth app detail pages mentioned in the previous section.

scope is a space-delimited list of scopes. If not provided, scope defaults to be openid profile email.

Config types

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

References