0.5.0 • Published 10 months ago

@yikesable/fastify-saas-auth-pg v0.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Fastify SaaS Auth PG

Postgres support for Fastify SaaS Auth

Module type: ESM Types in JS neostandard javascript style Follow @voxpelli@mastodon.social

Usage

import fastify from 'fastify';

import { fastifySaasAuthPlugin } from '@yikesable/fastify-saas-auth';
import { saasAuthPg } from '@yikesable/fastify-saas-auth-pg';

const app = fastify();

app
  .register(import('@fastify/postgres'), { connectionString: DATABASE_URL })
  .register(fastifySaasAuthPlugin, parent => {
    /** @type {import('@yikesable/fastify-saas-auth').SaasAuthOptions} */
    const config = {
      authIssuers,
      authPageHandler: async (request, reply) => {
        // Render authentication page
      },
      baseUrl,
      getUserIdFromHeader: NODE_ENV === 'test',
      sessionSecurityKey: SESSION_SECRET,
      ...saasAuthPg(parent.pg),
    };

    return config;
  });

API

TBD

0.5.0

10 months ago

0.4.1

10 months ago

0.4.0

11 months ago

0.3.0

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.0

2 years ago