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

hapi-auth

v1.0.1

Published

A Complete Login Solution for Hapi.js Apps/APIs

Downloads

7

Readme

Hapi Login

A Complete Login Solution for Hapi.js Apps/APIs to get you up and running in the next 5 minutes.

Build Status codecov.io Dependency Status

Why?

Letting people login to your App/API is essential any time there is personalized content/functionality to display.

We needed a easy way of doing Login/Authentication for our projects that we could drop into any project and be up-and running in minutes and thus avoid people re-inventing the wheel too often.

After much research and investigation, we decided to use a few existing Hapi modules together to form a re-useable starter package.

What?

Login for Hapi Apps/APIs which gives you a set of routes and a predictable usage pattern.

Tested

Our objective is to extensively test every aspect of this package so that we can rely on the package for our high-traffic/security projects.

If you spot any area for improvement, please create an issue: https://github.com/dwyl/hapi-login/issues so we can discuss!

How? contributions welcome

As the name suggests, this plugin is built for apps built with the Hapi.js web framework.
If you or anyone on your team are new to Hapi, we have an introductory tutorial: https://github.com/nelsonic/learn-hapi

Basic Login

If all you need is the ability to let people login to your app/website using an email/username and password, see: https://github.com/dwyl/hapi-login

Google Auth

We are using the Googles to let people sign into our App(s) @dwylhq because we all use Gmail and Google Calendar personally, so it makes sense.

To enable Google Auth you will need to have two Environment Variables set:

GOOGLE_CLIENT_ID=YourAppsClientId.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=SuperSecret

You will need to create an App on https://console.developers.google.com and get your CLIENT_ID & CLIENT_SECRET. We export these two variables prefixed with GOOGLE_ to distinguish them from other services.

Dependencies

  • google-api-nodejs-client - handles authentication with Google and access to other Google Services. Build Status Coverage Status Dependency Status

  • hapi-auth-jwt2 - lets us track the session for people who have logged in and identify (authorise) people returning to the site/app using a JSON Web Token Build Status codecov.io Dependency Status

  • bell - Facebook, Twitter & LinkedIn Authentication

Research

Further Reading

If you want to learn more about the dwyl technology stack and how this module fits into it, please see: https://github.com/dwyl/technology-stack

Google Authentication

visit: https://console.developers.google.com to get started

Recommended Reading

  • Introduction to OAuth2: https://www.digitalocean.com/community/tutorials/an-introduction-to-oauth-2