The second function handleAfterLogin is called at the page where the user must be redirected after login, but the getDefaultSession() property returns the following:
Hi @PabloCanalSuarez (love the username ). The function handleIncomingRedirect needs to be passed the page’s query parameters to obtain all the information needed to finalise the request. I’m guessing that propertiesSolid.redirectUriLogin is a predefined constant URL, rather than the actual current location (i.e. window.location.href). Thus, if you pass it window.location.href, it should start to work.
(In fact, that parameter isn’t even required - I’ll submit a PR to the docs to remove that. If you don’t provide one, it will automatically use window.location.href.)
Hi @Vincent, I just checked what you said about taking as parameter the window.location.href and now the login process is working as it should, returning isLoggedIn as true. Thank you very much!!!
I’ve just encountered another issue, and I’m not sure if this is something that I’m doing wrong or if it’s the proper behavior. When I refresh the page after achieving a successful login process, the isLoggedIn property of the Session returns false.
Why is this happening? The user is still logged in the Provider, so I don’t get why it appears as a not logged user.
The good news is that people have likely figured out a way to do this securely after all. If you look at the pull requests of that repository, there are a couple of them that should together address this issue (via what’s called “silent authentication”), so hopefully a new release will arrive shortly that will fix this issue for you.