{"action":"created","issue":{"url":"https://api.github.com/repos/manfredsteyer/angular-oauth2-oidc/issues/362","repository_url":"https://api.github.com/repos/manfredsteyer/angular-oauth2-oidc","labels_url":"https://api.github.com/repos/manfredsteyer/angular-oauth2-oidc/issues/362/labels{/name}","comments_url":"https://api.github.com/repos/manfredsteyer/angular-oauth2-oidc/issues/362/comments","events_url":"https://api.github.com/repos/manfredsteyer/angular-oauth2-oidc/issues/362/events","html_url":"https://github.com/manfredsteyer/angular-oauth2-oidc/issues/362","id":334047544,"node_id":"MDU6SXNzdWUzMzQwNDc1NDQ=","number":362,"title":"Error validating tokens  TypeError: Object(...) is not a function","user":{"login":"zac87","id":35594146,"node_id":"MDQ6VXNlcjM1NTk0MTQ2","avatar_url":"https://avatars1.githubusercontent.com/u/35594146?v=4","gravatar_id":"","url":"https://api.github.com/users/zac87","html_url":"https://github.com/zac87","followers_url":"https://api.github.com/users/zac87/followers","following_url":"https://api.github.com/users/zac87/following{/other_user}","gists_url":"https://api.github.com/users/zac87/gists{/gist_id}","starred_url":"https://api.github.com/users/zac87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zac87/subscriptions","organizations_url":"https://api.github.com/users/zac87/orgs","repos_url":"https://api.github.com/users/zac87/repos","events_url":"https://api.github.com/users/zac87/events{/privacy}","received_events_url":"https://api.github.com/users/zac87/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-20T12:06:30Z","updated_at":"2018-06-20T14:24:49Z","closed_at":null,"author_association":"NONE","body":"I am encountering the following console output when signing in.\r\n\r\n> Error validating tokens\r\n> stack: \"./node_modules/angular-oauth2-oidc/esm5/angular-oauth2-oidc.js/OAuthService.prototype.setupIdTokenTimer\r\n\r\nAnd\r\n\r\n> Error: Uncaught (in promise): TypeError: Object(...) is not a function\r\n./node_modules/angular-oauth2-oidc/esm5/angular-oauth2-oidc.js/OAuthService.prototype.setupIdTokenTimer/\r\n\r\nThe token is  successfully retrieved can send it with the HttpInterceptor.\r\nMy Config looks like this:\r\n\r\n\r\n```\r\nauthConfig: AuthConfig = {\r\n  issuer: 'http://xx.xx.xx.xx/auth',\r\n  redirectUri: 'http://x.x.x.x/login',\r\n  logoutUrl: 'http://x.x.x.x',\r\n  oidc: true,\r\n  requireHttps: false,\r\n  clientId: 'someclientid',\r\n  scope: 'openid profile email',\r\n}\r\n\r\n```\r\nIn my AppComponent : \r\n```\r\n constructor(private config: ConfigService, private oauthService: OAuthService) {\r\n    if(!oauthService.hasValidAccessToken()) {\r\n      this.configureWithNewConfigApi();\r\n      console.log(\"new config\");\r\n    } else {\r\n      console.log(\"valid token\");\r\n    }\r\n  }\r\n\r\n  private configureWithNewConfigApi() {\r\n    this.oauthService.configure(this.authConfig);\r\n    this.oauthService.tokenValidationHandler = new JwksValidationHandler();\r\n    this.oauthService.loadDiscoveryDocumentAndLogin();\r\n    this.oauthService.events.subscribe(({ type } : OAuthEvent) => {\r\n      switch (type) {\r\n        case 'token_received':\r\n          const idToken = this.oauthService.getIdToken();\r\n          const accessToken = this.oauthService.getAccessToken();\r\n          if (accessToken && idToken) {\r\n            console.log(\"AccessToken : \"+ accessToken);\r\n            console.log(\"IdToken : \" + idToken);\r\n          }\r\n      }\r\n });\r\n```\r\n\r\nMy system\r\n```\r\n\r\n> \r\n>    / \\   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|\r\n>   / △ \\ | '_ \\ / _` | | | | |/ _` | '__|   | |   | |    | |\r\n>  / ___ \\| | | | (_| | |_| | | (_| | |      | |___| |___ | |\r\n> /_/   \\_\\_| |_|\\__, |\\__,_|_|\\__,_|_|       \\____|_____|___|\r\n>                |___/\r\n> \r\n> Angular CLI: 1.7.1\r\n> Node: 8.9.4\r\n> OS: win32 x64\r\n> Angular: 5.2.6\r\n> ... animations, common, compiler, compiler-cli, core, forms\r\n> ... http, language-service, platform-browser\r\n> ... platform-browser-dynamic, router\r\n> \r\n> @angular/cdk: 5.2.2\r\n> @angular/cli: 1.7.1\r\n\r\n```\r\n\r\nAny hints what could be the cause of this issue?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/manfredsteyer/angular-oauth2-oidc/issues/comments/398768543","html_url":"https://github.com/manfredsteyer/angular-oauth2-oidc/issues/362#issuecomment-398768543","issue_url":"https://api.github.com/repos/manfredsteyer/angular-oauth2-oidc/issues/362","id":398768543,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODc2ODU0Mw==","user":{"login":"SaydChada","id":10726705,"node_id":"MDQ6VXNlcjEwNzI2NzA1","avatar_url":"https://avatars1.githubusercontent.com/u/10726705?v=4","gravatar_id":"","url":"https://api.github.com/users/SaydChada","html_url":"https://github.com/SaydChada","followers_url":"https://api.github.com/users/SaydChada/followers","following_url":"https://api.github.com/users/SaydChada/following{/other_user}","gists_url":"https://api.github.com/users/SaydChada/gists{/gist_id}","starred_url":"https://api.github.com/users/SaydChada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaydChada/subscriptions","organizations_url":"https://api.github.com/users/SaydChada/orgs","repos_url":"https://api.github.com/users/SaydChada/repos","events_url":"https://api.github.com/users/SaydChada/events{/privacy}","received_events_url":"https://api.github.com/users/SaydChada/received_events","type":"User","site_admin":false},"created_at":"2018-06-20T14:24:49Z","updated_at":"2018-06-20T14:24:49Z","author_association":"NONE","body":"Same problem occured when i upgraded from 3.0.1 to 4.0.1 :("}}
{"actor":{"display_login":"SaydChada"}}