{"action":"created","issue":{"url":"https://api.github.com/repos/manfredsteyer/angular-oauth2-oidc/issues/334","repository_url":"https://api.github.com/repos/manfredsteyer/angular-oauth2-oidc","labels_url":"https://api.github.com/repos/manfredsteyer/angular-oauth2-oidc/issues/334/labels{/name}","comments_url":"https://api.github.com/repos/manfredsteyer/angular-oauth2-oidc/issues/334/comments","events_url":"https://api.github.com/repos/manfredsteyer/angular-oauth2-oidc/issues/334/events","html_url":"https://github.com/manfredsteyer/angular-oauth2-oidc/issues/334","id":326604269,"number":334,"title":"JWT timeout with localStorage","user":{"login":"mze9412","id":1517721,"avatar_url":"https://avatars0.githubusercontent.com/u/1517721?v=4","gravatar_id":"","url":"https://api.github.com/users/mze9412","html_url":"https://github.com/mze9412","followers_url":"https://api.github.com/users/mze9412/followers","following_url":"https://api.github.com/users/mze9412/following{/other_user}","gists_url":"https://api.github.com/users/mze9412/gists{/gist_id}","starred_url":"https://api.github.com/users/mze9412/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mze9412/subscriptions","organizations_url":"https://api.github.com/users/mze9412/orgs","repos_url":"https://api.github.com/users/mze9412/repos","events_url":"https://api.github.com/users/mze9412/events{/privacy}","received_events_url":"https://api.github.com/users/mze9412/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-25T17:21:33Z","updated_at":"2018-05-25T22:08:11Z","closed_at":null,"author_association":"NONE","body":"I am validating and using the JWT token which I obtained client side on the server. It all worked pretty well until I added client-side storing of tokens via this line:\r\n      provide: OAuthStorage, useValue: localStorage\r\n\r\nSince then I do get automatically logged in client side, but the JWT token is expired and server side validation of it fails.\r\n\r\nI do have silent refresh enabled via this:\r\n    this.oauthService.setupAutomaticSilentRefresh();\r\n\r\nDid I miss any additional setting? I do provide the silent-refresh.html like it is done in the sample.\r\nI use Google as my oauth provider.\r\n\r\n![image](https://user-images.githubusercontent.com/1517721/40557504-9ee6b1a6-6050-11e8-9dfb-1699ca64379c.png)\r\n"},"comment":{"url":"https://api.github.com/repos/manfredsteyer/angular-oauth2-oidc/issues/comments/392199957","html_url":"https://github.com/manfredsteyer/angular-oauth2-oidc/issues/334#issuecomment-392199957","issue_url":"https://api.github.com/repos/manfredsteyer/angular-oauth2-oidc/issues/334","id":392199957,"user":{"login":"jeroenheijmans","id":1590536,"avatar_url":"https://avatars1.githubusercontent.com/u/1590536?v=4","gravatar_id":"","url":"https://api.github.com/users/jeroenheijmans","html_url":"https://github.com/jeroenheijmans","followers_url":"https://api.github.com/users/jeroenheijmans/followers","following_url":"https://api.github.com/users/jeroenheijmans/following{/other_user}","gists_url":"https://api.github.com/users/jeroenheijmans/gists{/gist_id}","starred_url":"https://api.github.com/users/jeroenheijmans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeroenheijmans/subscriptions","organizations_url":"https://api.github.com/users/jeroenheijmans/orgs","repos_url":"https://api.github.com/users/jeroenheijmans/repos","events_url":"https://api.github.com/users/jeroenheijmans/events{/privacy}","received_events_url":"https://api.github.com/users/jeroenheijmans/received_events","type":"User","site_admin":false},"created_at":"2018-05-25T22:08:11Z","updated_at":"2018-05-25T22:08:11Z","author_association":"NONE","body":"I suggest adding something along these lines:\r\n\r\n```js\r\n    this.oauthService.events.subscribe(e => { \r\n      if (e instanceof OAuthErrorEvent) { console.error(e); } \r\n      else { console.warn(e) } \r\n    });\r\n```\r\n\r\nThis should output some interesting events to the console, telling you what's going on. Perhaps you could share those logs with us here?\r\n\r\nFor even more detailed logs you could [enable debug information via 'showDebugInformation` in the config](https://manfredsteyer.github.io/angular-oauth2-oidc/docs/classes/AuthConfig.html#showDebugInformation) (note that you have to tweak your browser console to show debug level log output).\r\n\r\nFinally, I also suggest setting [`timeoutFactor`](https://manfredsteyer.github.io/angular-oauth2-oidc/docs/classes/AuthConfig.html#timeoutFactor) more aggressively for testing purposes, if you haven't already.\r\n\r\nBottom line is that everything you mention in your question seems to be in order, so any problem you might experience is caused by code or settings we can't see. We'll need logs or a minimal repro to be able to reliably help further AFAICT."}}
{"actor":{"display_login":"jeroenheijmans"}}