mjlading / flashlearn

A learning webapp for students
https://flashlearn.no
2 stars 0 forks source link

tRPC throws multiple errors when practicing cards #75

Open Gunnar-Solli-Olsen opened 5 months ago

Gunnar-Solli-Olsen commented 5 months ago

tRPC repeatedly throws errors while going through card practice without being logged into account.

Image

This can be fixed by either disallowing card practice with feedback while not logged in (this will also save some api tokens), or by checking for a user session when fetching required data.

Gunnar-Solli-Olsen commented 5 months ago

The fastest solution i can think of for this would be to not allow starting any type of practice without having an account. This does increase the barrier to entry somewhat, since there is no good way to "test the waters", to see if any flashcards are good enough to use our service.

A better way would be to have a middleground, where you can enter visual practice mode for any public deck. Since visual practice mode does not interract with any third party api, it can and maybe should be permitted for use without an affiliated account.

Gunnar-Solli-Olsen commented 5 months ago

Frontend fix pushed, visual practice is now possible for guest users.

redirect to login page should be added for cases when guest user manually enters url.