alkem-io / client-web

Default web frontend, enabling browsing the Alkemio platform - so the hosted Challenges and communities collaborating around those Challenges.
https://alkem.io
European Union Public License 1.2
15 stars 6 forks source link

Fix user getting error messages in the dashboard on the first login #6504

Closed ccanos closed 2 days ago

ccanos commented 5 days ago

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