Login w/ PodSpace, returned session.info.isLoggedIn is always false

from my page: /login/index.html
I’m using the function:
login ( {
oidcIssuer: “https://login.inrupt.com”,
redirectUrl: new URL(“/”, window.location.href).toString(),
clientName: “Clara PHR”
}
As you can see, it is redirected back to the main but I also test with /login/index.html and same effect.

When the page returns from PodSpaces and the permissions are granted, I call:
await handleIncomingRedirect();

The return redirect is to my local machine as:
/http://192.168.1.93:8000/?code=8b9718b1-0d9e-4e96-b3c2-5a5825217d8a&state=2de13e288f13464aabeced6044c3147a&iss=https%3A%2F%2Flogin.inrupt.com

then I call:
session = getDefaultSession();

The session.info.isLoggedIn is always false.

I’ve reviewed this topic but it did not solve the issue:

Hi @TimG , is this related to the conversation happening in handleIncomingRedirect() w/ redirect creates endless loop - #9 by TimG, or is it actually a separate issue ? In the network logs, can you see a request sent to the /token endpoint of https://login.inrupt.com, with a 200 response having a JSON payload that includes an access_token?

@zwifi Yes it is related. Sorry, I should have closed this one. I figured it out.

1 Like