@ist-group/playground-oidc-express
TypeScript icon, indicating that this package has built-in type declarations

0.0.11 • Public • Published

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: <basePath>
  • Post logout: <basePath>
  • Silent renew: <basePath>/silent-renew.html

configuration example from code above:

Note: trailing "/" (slash) is removed

Readme

Keywords

none

Package Sidebar

Install

npm i @ist-group/playground-oidc-express

Weekly Downloads

1

Version

0.0.11

License

MIT

Unpacked Size

14.3 kB

Total Files

13

Last publish

Collaborators

  • omer.irfan
  • gabts