Skip to content

ekoeryanto/fastify-keycloak

Repository files navigation

Fastify Keycloak Connect

Fastify plugin for keycloak (Identity and Access Management Solution)

Usage

With fastify secure session

const fastifyKeycloak = require("fastify-keycloak");

const store = fastify.createSecureSession({});

fastify.register(fastifyKeycloak, {
  options: { store },
  middleware: { logout: "/leave" },
});

With fastify session

const fastifyKeycloak = require("fastify-keycloak");
const fastifySession = require("fastify-session");
const Store = require("fastify-session/lib/store");

const store = new Store();

fastify.register(fastifySession, { store });
fastify.register(fastifyKeycloak, {
  options: { store },
});

With fastify cookie only

const fastifyKeycloak = require("fastify-keycloak");
const Cookie = require("fastify-cookie");

fastify.register(fastifyKeycloak, {
  options: { cookies: true },
});

About

Fastify Keycloak connect integration

Resources

License

Stars

Watchers

Forks

Packages

No packages published