Created
September 26, 2018 02:04
-
-
Save husseinkorly/b0dfac91713207bf2edea0850ee095c7 to your computer and use it in GitHub Desktop.
This file contains 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
import { enableProdMode } from '@angular/core'; | |
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | |
import * as AuthenticationContext from 'adal-angular'; | |
import { AppModule } from './app/app.module'; | |
import { environment } from './environments/environment'; | |
if (environment.production) { | |
enableProdMode(); | |
} | |
// this code will prevent from bootstrapping any module in Adal's Iframe | |
if (window === window.parent) { | |
platformBrowserDynamic() | |
.bootstrapModule(AppModule) | |
.catch(err => console.log(err)); | |
} else { | |
const context = new AuthenticationContext(environment.adalConfig as any); | |
context.handleWindowCallback(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment