TimG
January 17, 2025, 7:00am
1
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, I’m using the new library solid-client-authn-browser to create the authentication method of my app, and I can’t manage to make it work.
I’ve followed this guide that Inrupt provides, and here’s my code:
export function initLogin() {
if (!getDefaultSession().info.isLoggedIn) {
return login({
oidcIssuer: solidProviders.INRUPT,
redirectUrl: propertiesSolid.redirectUriLogin
});
}
}
export async function handleAfterLogin() {
await handleIncom…
zwifi
January 24, 2025, 8:57am
2
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
?
TimG
January 25, 2025, 1:07am
3
@zwifi Yes it is related. Sorry, I should have closed this one. I figured it out.
1 Like