sloukit / pydew-valley-uzh

Mod of Pydew Valley for an experimental study in Psychology
Creative Commons Zero v1.0 Universal
31 stars 61 forks source link

a basic implementation how we can create login tokens #120

Closed ultimateownsz closed 2 months ago

ultimateownsz commented 2 months ago

Summary

This PR is made to test out a basic version of a token generator for the login to the game. Participants can create their user to get a token to log in to the game. Later on, we can have more logic added to have it also save the player's progress that they can log in with their token after saving.

I made it work locally with flask and SQL Alchemy.

Extra:

Checklist

Labels

size: S, area: publishing, area: analytics

ultimateownsz commented 2 months ago

Before the review I need to make some other changes. Now when I create the site.db it stores it in the same directory as where the main.py is located. I want to make this to the data directory where other databases are stored.

Also for some minor changes add a dotenv where the future api key can be stored in and not stored in the actual code publicly. For now it is for local use so it doesn't matter that much, but if we alter the code to have a real api key we may want to have this already implemented before hand.

ultimateownsz commented 2 months ago

Thanks for the review, I will change the things you mentioned and make it more understandable! @Mega-JC

ultimateownsz commented 2 months ago

Hey I haven't had time to implement a better idea and I lack the experience with this. I don't have much time lately so I'm post poning this PR. Thanks for the review!