-
-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store user preferences + stars in firebase instead of localstorage #83
Comments
We need to determine the database structure, is it better to store the individual users and which themes/extensions they've liked in an object for the user, or is it better to store the themes and extensions with all of the users who liked them? We may have to do both. |
So I just realized a pretty huge issue with this. We can READ data fine, but if we want to WRITE data (e.g. when a user stars a theme), it will need to have our Supabase/Firebase credentials stored in the publicly-accessible code, which would allow anyone to do whatever they want to it. To get around this, we would need a private server that has the actual Supabase connection, and then POST data to it from within Spotify when we want to send anything. |
More notes on that issue:
|
There are ways to authenticate users so they won't do whatever they want https://supabase.com/docs/guides/auth I don't understand what you mean |
Usually there is some sort of API key, connection string, or secret, or something, to actually initiate the database connection. So it knows where the database is and is able to write to it. If those are in the code, anyone would be able to use them to write their own code and do what they want, no? Or are you saying since it's hosted, we just need some identifier for our database, and it handles stuff with user logins automatically? |
Yeah, only the creators have access to the database's content. So people won't have access to other people's API keys |
Just an idea. Not sure if feasible. We could have a table with users and their preferences (e.g. tabs, stars enabled, etc). This would be linked with their Spotify username/id or something. That way you can have the same marketplace experience on multiple computers.
The text was updated successfully, but these errors were encountered: