Closed YoniH closed 5 years ago
Once you redirected back to the page with the access token and id token, you have to call following method.
var curUrl = window.location.href;
auth.parseCognitoWebResponse(curUrl)
Note : curUrl is your redirected url with the access token and id token
Thanks! I missed that. It's working now
Once you redirected back to the page with the access token and id token, you have to call following method.
var curUrl = window.location.href; auth.parseCognitoWebResponse(curUrl)
Note : curUrl is your redirected url with the access token and id token
This works! thanks
After logging in in the hosted UI page, I am redirected back to my page with access token and id token, which is good. But then I call some sdk methods and it seems that I'm not logged in: auth.isUserSignedIn() -> false auth.getCurrentUser() -> null auth.getSignInUserSession() -> all tokens are empty strings auth.getUserContextData() -> undefined
Here's my code (React):
What am I doing wrong?