Advertisement
rodrigosan88

Untitled

Nov 20th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. export function initializer(keycloak: KeycloakService): () => Promise<any> {
  2.   return (): Promise<any> => {
  3.     return new Promise(async (resolve, reject) => {
  4.       try {
  5.         await keycloak.init({
  6.           config: environment.keycloak,
  7.           initOptions: {
  8.             onLoad: 'login-required',
  9.             checkLoginIframe: false
  10.           },
  11.           bearerExcludedUrls: []
  12.         });
  13.         resolve();
  14.       } catch (error) {
  15.         reject(error);
  16.       }
  17.     });
  18.   };
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement