Closed ebuychance closed 6 years ago
When the redirect comes back to your signing uri it will have parameters attached to the URI that carries the results of the login (localhost won't work, you have to register this URI with cognito, and it should be https to protect the parameters).
From the front page of the doc you process those parameters by calling: parseCognitoWebResponse
The section from the readme is:
For the cache tokens and scopes, use the parseCognitoWebResponse(Response) API, e.g. the response is the current window url:
var curUrl = window.location.href; auth.parseCognitoWebResponse(curUrl);
useCodeGrantFlow() enabled.
I hit the Cognito hosted UI login just fine and after authenticating but stepping through the code I hit the
this.launchUri(URL)
path of getSession().This redirects me with a code and state param but no local storage is being set...
• Am I supposed to manually consume the code and set the local storage via the SDK methods? Or am I missing something?
• Is it safe to assume if I was granted a code and state that I successfully authenticated with the user pool?
I also notice the auth.userhandler callbacks are never hit which I do not understand. When trying to use the sample code example what should the auth redirects be set to so I can run it from the local file system?
A SDK flow diagram would help me understand how to use the Auth library properly, but any help would be greatly appreciated. Thanks.