Reputation: 11
I'm currently developing a webapp for a university teamwork, where we are using a Session Provider in order to manage each user's account. We are currently using inrupt, cause we are also using SOLID POD's so every user can store its personal data.
The problem comes at the moment of restoring a session, I mean, when you refresh the page, you would expect to still have your account logged in.
This is our App.tsx
:
import {SessionProvider} from "@inrupt/solid-ui-react";
import React from 'react';
import './App.css';
import ViewPaths from "./components/ViewPaths";
function App(): JSX.Element {
return (
<SessionProvider session-id="login">
<ViewPaths/>
</SessionProvider>
);
}
ViewPaths is a Routes component
I know that the solution should be easy, If just added:
restorePreviousSession={true}
to the SessionProvider
element, but right after I add this, my app just crashes and returns this:
{"error":"invalid_request","error_description":"Mismatching redirect uri"}
So it just does not work as anyone would expect, I've tried searching for it but got nothing...
Has anyone had this problem before or know what should I do in order to fix it and be able to store a user's session?
Thank you!
I tried adding restorePreviousSession={true}
to our SessionProvider
element, so it would store the user's session, but instead it just crashed and I could not do anything on my app.
Upvotes: 0
Views: 152
Reputation: 11
Problem solved! It was a version problem:
"@inrupt/solid-client-authn-browser": "^1.13.4",
Adding this to my package.json worked perfectly!
Upvotes: 0