{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-amplify/issues/493","repository_url":"https://api.github.com/repos/aws/aws-amplify","labels_url":"https://api.github.com/repos/aws/aws-amplify/issues/493/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-amplify/issues/493/comments","events_url":"https://api.github.com/repos/aws/aws-amplify/issues/493/events","html_url":"https://github.com/aws/aws-amplify/issues/493","id":307421530,"number":493,"title":"AWS Amplify with isomorphic rendering","user":{"login":"mogusbi","id":3741464,"avatar_url":"https://avatars3.githubusercontent.com/u/3741464?v=4","gravatar_id":"","url":"https://api.github.com/users/mogusbi","html_url":"https://github.com/mogusbi","followers_url":"https://api.github.com/users/mogusbi/followers","following_url":"https://api.github.com/users/mogusbi/following{/other_user}","gists_url":"https://api.github.com/users/mogusbi/gists{/gist_id}","starred_url":"https://api.github.com/users/mogusbi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mogusbi/subscriptions","organizations_url":"https://api.github.com/users/mogusbi/orgs","repos_url":"https://api.github.com/users/mogusbi/repos","events_url":"https://api.github.com/users/mogusbi/events{/privacy}","received_events_url":"https://api.github.com/users/mogusbi/received_events","type":"User","site_admin":false},"labels":[{"id":708993532,"url":"https://api.github.com/repos/aws/aws-amplify/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/aws/aws-amplify/milestones/1","html_url":"https://github.com/aws/aws-amplify/milestone/1","labels_url":"https://api.github.com/repos/aws/aws-amplify/milestones/1/labels","id":3266290,"number":1,"title":"aws-amplify@0.4","description":"","creator":{"login":"mlabieniec","id":1417045,"avatar_url":"https://avatars1.githubusercontent.com/u/1417045?v=4","gravatar_id":"","url":"https://api.github.com/users/mlabieniec","html_url":"https://github.com/mlabieniec","followers_url":"https://api.github.com/users/mlabieniec/followers","following_url":"https://api.github.com/users/mlabieniec/following{/other_user}","gists_url":"https://api.github.com/users/mlabieniec/gists{/gist_id}","starred_url":"https://api.github.com/users/mlabieniec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlabieniec/subscriptions","organizations_url":"https://api.github.com/users/mlabieniec/orgs","repos_url":"https://api.github.com/users/mlabieniec/repos","events_url":"https://api.github.com/users/mlabieniec/events{/privacy}","received_events_url":"https://api.github.com/users/mlabieniec/received_events","type":"User","site_admin":false},"open_issues":29,"closed_issues":18,"state":"open","created_at":"2018-04-13T17:25:32Z","updated_at":"2018-05-02T18:29:09Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2018-03-21T21:18:07Z","updated_at":"2018-05-03T00:30:42Z","closed_at":null,"author_association":"NONE","body":"I'm currently integrating Amplify/Cognito into a server side rendered Angular 5 application. Obviously the server side rendered application has no access to local storage so I've configured Ampify to use cookie storage instead\r\n\r\n```\r\nAuth: {\r\n  ...\r\n      cookieStorage: {\r\n        domain: 'localhost',\r\n        expires: 365,\r\n        path: '/',\r\n        secure: false\r\n      },\r\n  ...\r\n}\r\n```\r\n\r\nBut when the server rendered application is loaded it shows these two errors when it tries to retrieve the cookies\r\n\r\n```\r\n[WARN] 51:02.95 Cache - getItem failed! TypeError: Cannot read property 'getItem' of null\r\n[WARN] 51:02.140 Cache - getItem failed! TypeError: Cannot read property 'getItem' of null\r\n```\r\n\r\nI'll hazard a guess and say that's because it's using `document.cookie` and that doesn't exist in the node environment. Are there any suggestions on how I can get the server rendered application to read the cookies from Amplify?"},"comment":{"url":"https://api.github.com/repos/aws/aws-amplify/issues/comments/386161756","html_url":"https://github.com/aws/aws-amplify/issues/493#issuecomment-386161756","issue_url":"https://api.github.com/repos/aws/aws-amplify/issues/493","id":386161756,"user":{"login":"crysislinux","id":5404597,"avatar_url":"https://avatars2.githubusercontent.com/u/5404597?v=4","gravatar_id":"","url":"https://api.github.com/users/crysislinux","html_url":"https://github.com/crysislinux","followers_url":"https://api.github.com/users/crysislinux/followers","following_url":"https://api.github.com/users/crysislinux/following{/other_user}","gists_url":"https://api.github.com/users/crysislinux/gists{/gist_id}","starred_url":"https://api.github.com/users/crysislinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crysislinux/subscriptions","organizations_url":"https://api.github.com/users/crysislinux/orgs","repos_url":"https://api.github.com/users/crysislinux/repos","events_url":"https://api.github.com/users/crysislinux/events{/privacy}","received_events_url":"https://api.github.com/users/crysislinux/received_events","type":"User","site_admin":false},"created_at":"2018-05-03T00:30:42Z","updated_at":"2018-05-03T00:30:42Z","author_association":"NONE","body":"@Integralist I think it can be used on server-side, we were using it to handle user signin/signup with it. the only thing we need to do is add this on top of the entry js file\r\n```js\r\nimport fetch from 'node-fetch';\r\nglobal.fetch = global.fetch || fetch;\r\n```\r\n\r\nIt will warn you about getItem, but that's fine."}}
{"actor":{"display_login":"crysislinux"}}