{"action":"created","issue":{"url":"https://api.github.com/repos/aws/amazon-cognito-auth-js/issues/44","repository_url":"https://api.github.com/repos/aws/amazon-cognito-auth-js","labels_url":"https://api.github.com/repos/aws/amazon-cognito-auth-js/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/aws/amazon-cognito-auth-js/issues/44/comments","events_url":"https://api.github.com/repos/aws/amazon-cognito-auth-js/issues/44/events","html_url":"https://github.com/aws/amazon-cognito-auth-js/issues/44","id":271098248,"number":44,"title":"how to set state parameter in the callback URL? ","user":{"login":"goldenbearkin","id":11225712,"avatar_url":"https://avatars3.githubusercontent.com/u/11225712?v=4","gravatar_id":"","url":"https://api.github.com/users/goldenbearkin","html_url":"https://github.com/goldenbearkin","followers_url":"https://api.github.com/users/goldenbearkin/followers","following_url":"https://api.github.com/users/goldenbearkin/following{/other_user}","gists_url":"https://api.github.com/users/goldenbearkin/gists{/gist_id}","starred_url":"https://api.github.com/users/goldenbearkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goldenbearkin/subscriptions","organizations_url":"https://api.github.com/users/goldenbearkin/orgs","repos_url":"https://api.github.com/users/goldenbearkin/repos","events_url":"https://api.github.com/users/goldenbearkin/events{/privacy}","received_events_url":"https://api.github.com/users/goldenbearkin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-03T19:43:08Z","updated_at":"2017-11-30T07:31:36Z","closed_at":null,"author_association":"NONE","body":"I have a SPA and would like to pass back the route information so that user can redirect to the route where they intend to access before undergo authentication.\r\n\r\nI found from the aws documentation http://docs.aws.amazon.com/cognito/latest/developerguide/authorization-endpoint.html saying i can pass the state value back to the client:\r\n\r\nand i tried this but didn't work\r\n```js\r\n{\r\n  ClientId: '*************************',\r\n  AppWebDomain: '***********.auth.ap-northeast-1.amazoncognito.com',\r\n  TokenScopesArray: ['email openid profile'],\r\n  RedirectUriSignIn: `https://*****/cognitocallback?STATE=dashboard`,\r\n  RedirectUriSignOut: `https://*****`\r\n}\r\n````\r\ni can find auth.getSession() the only api to sign-in user. Please suggest how to do it for this library? Many thanks\r\n\r\n*I am sorry that i asked the same question before but got closed immediately."},"comment":{"url":"https://api.github.com/repos/aws/amazon-cognito-auth-js/issues/comments/348105736","html_url":"https://github.com/aws/amazon-cognito-auth-js/issues/44#issuecomment-348105736","issue_url":"https://api.github.com/repos/aws/amazon-cognito-auth-js/issues/44","id":348105736,"user":{"login":"jonasao","id":8456082,"avatar_url":"https://avatars1.githubusercontent.com/u/8456082?v=4","gravatar_id":"","url":"https://api.github.com/users/jonasao","html_url":"https://github.com/jonasao","followers_url":"https://api.github.com/users/jonasao/followers","following_url":"https://api.github.com/users/jonasao/following{/other_user}","gists_url":"https://api.github.com/users/jonasao/gists{/gist_id}","starred_url":"https://api.github.com/users/jonasao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonasao/subscriptions","organizations_url":"https://api.github.com/users/jonasao/orgs","repos_url":"https://api.github.com/users/jonasao/repos","events_url":"https://api.github.com/users/jonasao/events{/privacy}","received_events_url":"https://api.github.com/users/jonasao/received_events","type":"User","site_admin":false},"created_at":"2017-11-30T07:31:36Z","updated_at":"2017-11-30T07:31:36Z","author_association":"NONE","body":"Any feedback on this one from the AWS Cognito team would be much appreciated!"}}
{"actor":{"display_login":"jonasao"}}