Closed shesellsanctuary closed 3 years ago
If your login callback handling code is on a different instance of the UserManager (because it's running on a diff page) then perhaps that's why?
I think that is it. We have a html callback page that uses another usermanager instance, because based on this OAuth guidelines there cannot be fragments in the redirect url. So there is no way of using the event this way?
Right, so then on that callback page redirect back into your main app. The main app usually would call getUser() on load to know about the user's session.
Right, thank you, but the getUser() method does not raise the user loaded event.
getUser() {
return this._loadUser().then(user => {
if (user) {
Log.info("UserManager.getUser: user loaded");
this._events.load(user, false);
return user;
}
else {
Log.info("UserManager.getUser: user not found in storage");
return null;
}
});
}
Anyway we can create another method that calls the getUser() and dispatches our action then. Thank you for the insight!
I think you're all set on this now so closing.
Hello, I have the following code in attempt to implement the Authorization flow with redux after making it work without redux, so the flow happens ok every time, but the UserLoaded event is not triggered when the signinRedirect happens. I have seen in the UserManagerEvents.js that it should be raised after a successfull login, so I don't know why it is not being raised in my code. Do you have any ideas?
(This is my first git issue ever, please let me know if you need more info)