{"action":"closed","issue":{"url":"https://api.github.com/repos/aspnet/JavaScriptServices/issues/617","repository_url":"https://api.github.com/repos/aspnet/JavaScriptServices","labels_url":"https://api.github.com/repos/aspnet/JavaScriptServices/issues/617/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/JavaScriptServices/issues/617/comments","events_url":"https://api.github.com/repos/aspnet/JavaScriptServices/issues/617/events","html_url":"https://github.com/aspnet/JavaScriptServices/issues/617","id":203781206,"number":617,"title":"WebPack,OIDC and Client Side Rendering -WebStorageStateStore","user":{"login":"DoubleExposure","id":922152,"avatar_url":"https://avatars.githubusercontent.com/u/922152?v=3","gravatar_id":"","url":"https://api.github.com/users/DoubleExposure","html_url":"https://github.com/DoubleExposure","followers_url":"https://api.github.com/users/DoubleExposure/followers","following_url":"https://api.github.com/users/DoubleExposure/following{/other_user}","gists_url":"https://api.github.com/users/DoubleExposure/gists{/gist_id}","starred_url":"https://api.github.com/users/DoubleExposure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoubleExposure/subscriptions","organizations_url":"https://api.github.com/users/DoubleExposure/orgs","repos_url":"https://api.github.com/users/DoubleExposure/repos","events_url":"https://api.github.com/users/DoubleExposure/events{/privacy}","received_events_url":"https://api.github.com/users/DoubleExposure/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-01-28T02:12:51Z","updated_at":"2017-01-30T10:38:34Z","closed_at":"2017-01-30T10:38:34Z","body":"In my appcompnent.ts file, I am trying to authenticate my user by calling the following on page load:\r\n```\r\nexport class AppComponent implements OnInit {\r\n\r\n    constructor( private authService: AuthService) { }\r\n\r\n    ngOnInit() {\r\n        this.authService.startSigninMainWindow();\r\n\r\n    }\r\n```\r\nI expect this to route me to the IdentityServer login page. \r\nIn my auth.service.ts file, I am loading WebStorageStateStore like below.\r\n`import { UserManager, Log, MetadataService, User, WebStorageStateStore} from 'oidc-client';`\r\n\r\nIn auth.service.ts I have a const called settings. This is where I set the WebStorageStateStore.\r\n```\r\n```\r\n....    filterProtocolClaims: true,\r\n    loadUserInfo: true,\r\n    userStore: new WebStorageStateStore({ store: window.localStorage })\r\n}\r\n\r\nI get an error saying window is not defined. How do I resolve this? Webpack seems to be trying to render this serverside when there is no window object serverside. What is the recommended way to work around the serverside rendering and the conflict with a nonexistent window object? \r\n\r\n\r\nAn unhandled exception occurred while processing the request.\r\n\r\n```\r\nException: Call to Node module failed with error: Prerendering failed because of error: ReferenceError: window is not defined\r\nat Object.<anonymous> (main-server.js:617:65)\r\n```\r\n\r\nAny suggestions as to a work around? Does anyone know how to turn off serverside prerendering for this component? Can I tell Webpack to ignore this component somehow since the OIDC javascript library is clientside only and needs the window object?"}}
{"actor":{"display_login":"SteveSandersonMS"}}