Fix bug #6476
Users were redirected to the dashboard after login, and on the first login they don't have yet their profile created.
That was causing a lot of errors in other queries.
UserProvider (useUserContext), creates the profile the first time it's called if it doesn't exist yet. I think we need to refactor that in the future.
For now I have added a call to useUserContext to the loginSuccessPage.
That will make the login slower but at least we make sure the profile is fully created when the user is redirected.
We could also trigger a smaller request to from the login page and create the user there. I'll check on monday because I think we had a task about refactoring that profile creation, but I haven't seen it, probably @techsmyth remembers
also added two skips to usePendingMemberships, which I think were causing issues too
Fix bug #6476 Users were redirected to the dashboard after login, and on the first login they don't have yet their profile created. That was causing a lot of errors in other queries. UserProvider (useUserContext), creates the profile the first time it's called if it doesn't exist yet. I think we need to refactor that in the future. For now I have added a call to useUserContext to the loginSuccessPage. That will make the login slower but at least we make sure the profile is fully created when the user is redirected.
We could also trigger a smaller request to from the login page and create the user there. I'll check on monday because I think we had a task about refactoring that profile creation, but I haven't seen it, probably @techsmyth remembers
also added two skips to
usePendingMemberships
, which I think were causing issues too