Quantcast
Channel: Developer Experience - Solid Community Forum
Viewing all articles
Browse latest Browse all 39

How to make inrupt's authn library work with Vue/Pinia? (reactivity issue)

$
0
0

I’m developing a Solid App using Vue. Everything works roughly without issues, apart from the @inrupt/solid-client-authn-browser library.

For Vue, we would create a reactive object to the Session object, and use the values/fields of it. Due to the need to refresh (redirect) to log-in, I stored the object using Pinia store.

In principle, and in my tests, the reactive data should work without issues for nested data. However, if I try to use session.info.isLoggedIn (or any other fields in Session object), the reactivity disappears.
(See this repo if you want a MRE with example.)

In the end, I have to use some annoying tricks to make it work, namely listening to events and have my own reactive values for them (see handleRedirectAfterLogin() in my code). This basically requires me to duplicate every value I’m interested in.

Did anyone else run into this issue? How did you solve it? Or is this a bug that I’d better report to inrupt?

8 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 39

Trending Articles