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

@boilerz/super-server-auth-core

v1.6.41

Published

Core module for authentication support on super server

Downloads

69

Readme

@boilerz/super-server-auth-core

GitHub package.json version GH CI Action codecov

Core module for authentication support on super server

Install

npx install-peerdeps @boilerz/super-server-auth-core

Usage

This plugin add support for a sign up resolver and it is required for other super-server-auth-* plugin. It need a mongo setup to work so the plugin @boilerz/super-server-mongo need to be set before this one.

import { Arg, Query, Resolver } from 'type-graphql';
import * as superServer from '@boilerz/super-server';
import mongoPlugin from '@boilerz/super-server-mongo';
import authCorePlugin from '@boilerz/super-server-auth-core';

@Resolver()
class GreetingResolver {
  @Query(() => String)
  public hello(@Arg('name') name: string): string {
    return `Hello ${name}`;
  }
}

superServer
  .start({
    resolvers: [GreetingResolver],
    plugins: [mongoPlugin, authCorePlugin], // <-- Plugin here (after mongoPlugin)
  })
  .catch(console.error);

In situation example with local auth plugin example

If mail support is not disabled (@see DISABLE_MAILING_SUPPORT below) the worker process defined below should be setup:

node node_modules/@boilerz/super-server-auth-core/worker/email

Release

yarn version
yarn build
yarn publish dist --access public

Env vars

Web plugin

| Name | Default | Description | |---------------------------------------------|------------------------------|--------------------------------------------------------------------------------------------------------------------| | JWT_SECRET | Math.random().toString(36) | JWT secret | | JWT_EXPIRE_IN | 30 * 60 * 1000 | Token expiration in seconds. | | DISABLE_MAILING_SUPPORT | false | Disable mailing support. | | EXTERNAL_PROVIDER_LINK_CODE_EXPIRES_DURATION| 2 | External provider link code expiration in hours. | | EMAIL_VALIDATION_EXPIRES_DURATION | 48 | Validation code expiration in hours. | | AMQP_URL | amqp://localhost | AMQP url (used for communication between the plugin and the email validation worker). |

Email validation worker

| Name | Default | Description | |---------------------------------------------|---------------------------|--------------------------------------------------------------------------------------------------------------------| | SENDGRID_API_KEY | | Sendgrid API Key for email validation. | | SENDER_EMAIL | | Sendgrid sender email (must be validated by sendgrid). | | EMAIL_VALIDATION_TEMPLATE_ID | | Sendgrid validation email template id. (Must handle firstName, lastName and validationUrl as template data). | | LINK_ACCOUNT_TEMPLATE_ID | | Sendgrid link account template id. (Must handle firstName, lastName and linkCode as template data). | | WAITING_DURATION_BEFORE_NEXT_EMAIL_ATTEMPT | 5000 | Waiting duration in ms between two email validation attempt. | | AMQP_URL | amqp://localhost | See above |