0.0.11 • Published 4 years ago

@ist-group/playground-oidc-express v0.0.11

Weekly downloads
15
License
MIT
Repository
-
Last release
4 years ago

playground-oidc-express

A library for hosting graphql playground with oidc login as express middleware.

Installation

yarn add @ist-group/playground-oidc-client

Usage

import playground from "@ist-group/playground-oidc-express";

server.use(
  "/playground",
  playground({
    endpoint: "/graphql",
    auth: {
      clientId: "community-portal",
      scope: "openid profile community",
      authority: "https://demo.skolid.se"
    }
  })
);

Playground is now accessable from <domain>/playground.

Config

By default the authentication headers are only sent to the endpoint specified.

A list of regex (authHeaderFilters) can be included to allow headers to other paths and/or domains.

authHeaderFilters: [
  /^http:\/\/localhost:4010\/other_graphql$/,
  /^https:\/\/example.com\/graphql$/
];

Other params:

acrValues?: string; // default undefined
automaticSilentRenew?: boolean; // default true
noAutomaticLogin?: boolean; // default false

IdP configuration

The URL:s / paths which this library uses:

  • Redirect: \
  • Post logout: \
  • Silent renew: \/silent-renew.html

configuration example from code above:

Note: trailing "/" (slash) is removed

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago