Skip to content

Instantly share code, notes, and snippets.

@kmikulski kmikulski/post.jsx
Created Jun 7, 2018

Embed
What would you like to do?
the description for this gist
const keycloak = Keycloak({
realm: "MyDemo",
auth-server-url: "http://localhost:8080/auth",
ssl-required: "external",
resource: "my-react-client",
public-client: true,
confidential-port: 0
});
@anodynos

This comment has been minimized.

Copy link

commented Feb 4, 2019

You need quotes around keys with dashes - eg 'ssl-required' - so:

const keycloak = Keycloak({
  realm: 'MyDemo',
  'auth-server-url': 'http://localhost:8080/auth',
  'ssl-required': 'external',
  resource: 'my-react-client',
  'public-client': true,
  'confidential-port': 0
});
@jannes-io

This comment has been minimized.

Copy link

commented Sep 17, 2019

If I use a JS object I get an error.

const keycloak = Keycloak({
  realm: 'master',
  'auth-server-url': 'https://[redacted]/auth',
  'ssl-required': 'external',
  resource: '[redacted]',
  'public-client': true,
  'confidential-port': 0,
});

error:
uncaught exception: clientId missing

trace:

loadConfig keycloak.js:723
    init keycloak.js:137
    value index.js:397
    value index.js:378

any idea?
@anodynos @kmikulski

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.