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

**URL:** <https://forum.solidproject.org/t/login-w-podspace-returned-session-info-isloggedin-is-always-false/8601>\
**Category:** General Discussion\
**Created:** [January 17, 2025, 7:00am UTC](https://forum.solidproject.org/t/login-w-podspace-returned-session-info-isloggedin-is-always-false/8601 "2025-01-17T07:00:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TimG](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@TimG](https://forum.solidproject.org/u/TimG)\
**Post date:** [January 17, 2025, 7:00am UTC](https://forum.solidproject.org/t/login-w-podspace-returned-session-info-isloggedin-is-always-false/8601/1 "2025-01-17T07:00:30Z")

</div>

from my page: /login/index.html  
I’m using the function:  
login ( {  
oidcIssuer: “[https://login.inrupt.com](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](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:

> [@isLoggedIn property returning false every time](https://forum.solidproject.org/t/isloggedin-property-returning-false-every-time/4004):
>
> 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](https://docs.inrupt.com/developer-tools/javascript/client-libraries/tutorial/getting-started-part2/) 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…

---

<div class="post-metadata">

**Author:** ![zwifi](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/zwifi/32/1525_2.png) [@zwifi](https://forum.solidproject.org/u/zwifi)\
**Post date:** [January 24, 2025, 8:57am UTC](https://forum.solidproject.org/t/login-w-podspace-returned-session-info-isloggedin-is-always-false/8601/2 "2025-01-24T08:57:48Z")

</div>

Hi @TimG , is this related to the conversation happening in [handleIncomingRedirect() w/ redirect creates endless loop - #9 by TimG](https://forum.solidproject.org/t/handleincomingredirect-w-redirect-creates-endless-loop/8623/9), 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](https://login.inrupt.com), with a 200 response having a JSON payload that includes an `access_token`?

---

<div class="post-metadata">

**Author:** ![TimG](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@TimG](https://forum.solidproject.org/u/TimG)\
**Post date:** [January 25, 2025, 1:07am UTC](https://forum.solidproject.org/t/login-w-podspace-returned-session-info-isloggedin-is-always-false/8601/3 "2025-01-25T01:07:42Z")

</div>

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