Created
July 19, 2019 14:20
-
-
Save guzmonne/1e518e9d6ac25879f20fcc5a1a2d6b45 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var keycloak; | |
function init() { | |
// If the Keycloak constructor doesn't exist we'll throw | |
// an error. | |
if (window.Keycloak === undefined) { | |
throw new Error('Can\'t find Keycloak on the global scope'); | |
} | |
// Later on the article we'll see what a `realm` and | |
// a `client` means in Keycloak. | |
keycloak = new Keycloak({ | |
url: 'http://127.0.0.1:8080/auth', | |
realm: 'React App', | |
clientId: 'react-app-1' | |
}); | |
} | |
export { keycloak, init }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment