New extension: Supabase save state
Description
This extension adds support to save the game state to Supabase.
How to use the extension
Use the login or signup actions to log in the user. When the user is logged in, you can use the Get data and Save data actions.
Checklist
- [X] I've followed all of the best practices.
- [X] I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
- [X] I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.
What tier of review do you aim for your extension?
Community (Unreviewed)
Example file
Extension file
The tests failed because I use GDJS.__SupabaseSaveState. I need to store the Supabase client somewhere. This extension is still experimental, but Supabase is the best Firebase alternative. Since I'm creating this extension for me and for my family, I'm happy to share it with the community.
#1070 needs to be merged before merging this.
#1070 is ready
Thank you for submitting an extension.
Can you use a version of the library that is not minified? Because, otherwise, reviewers can't check the code for ill intents.
!update SupabaseSaveState.zip
Can't update the extension, as it doesn't pass automatic tests:
❌ 1 Error found in extension 'SupabaseSaveState':
⟶ ❌ [JavaScript disallowed properties]: Found disallowed properties in extension 'SupabaseSaveState':
{
allowedProperties: [
'makeUuid', 'rgbToHex',
'rgbOrHexToRGBColor', 'rgbToHexNumber',
'hexNumberToRGB', 'hexToRGBColor',
'copyArray', 'staticArray',
'staticArray2', 'staticObject',
'toDegrees', 'toRad',
'random', 'randomFloat',
'randomFloatInRange', 'randomInRange',
'randomWithStep', 'evtTools',
'Variable', 'RuntimeObject',
'Logger'
],
disallowedProperty: '__SupabaseSaveState',
objectName: 'gdjs'
}
{
allowedProperties: [
'keys',
'create',
'assign',
'is',
'values',
'entries',
'fromEntries',
'defineProperty',
'getOwnPropertyNames',
'getOwnPropertyDescriptor',
'defineProperties',
'prototype'
],
disallowedProperty: 'getOwnPropertySymbols',
objectName: 'Object'
}
{
allowedProperties: [
'keys',
'create',
'assign',
'is',
'values',
'entries',
'fromEntries',
'defineProperty',
'getOwnPropertyNames',
'getOwnPropertyDescriptor',
'defineProperties',
'prototype'
],
disallowedProperty: 'getPrototypeOf',
objectName: 'Object'
}
❌ 1 Error found in extensions - please fix it before generating the registry.
Hi, @D8H, as you can see, in the comment from GitHub Actions, I need you to merge #1070 before updating the extension. Then, I'll retry to update it.
!update SupabaseSaveState.zip
✅ Successfully updated the extension.
Added with the client library that is not minified.
This PR is ready to merge after you review it.
Any news about this? It's in review or it's awaiting review? It's the Extension Review project OK? There are no extensions marked as In Review.
The example project seems not to be up to date. Please attach a new one with the latest version.
Updated example: Click, Click!.zip
@D8H, Supabase's free tier pauses project after one week so if the Supabase project is down, tell me and I'll activate it.
@romw314 Thanks for this contribution! I am a Supabase user and would be interested in trying this in my games. I have a few questions:
-
What version of the Supabase SDK is included? (Perhaps document this in the extension somewhere)
-
Would anonymous logins be useful in games? This is a relatively new feature for Supabase. Most players don't like setting up accounts, so this could make a frictionless cloud save (with the risk that they will lose access if they change browsers or delete browser cache) https://supabase.com/docs/guides/auth/auth-anonymous
Thank you for submitting an extension.
I have a few suggestions:
- Supabase is not dedicated to game saves. As there will only be 1 extension for Supabase, it should be rephrased in a more general manner.
- The extension should not make any pop-up. Errors should be given back to extension users to let them handle the errors as they want.
@tristanbob, @D8H, I'll try to meet your needs with my extension.
Supabase is not dedicated to game saves. As there will only be 1 extension for Supabase, it should be rephrased in a more general manner.
I can rename the extension to "Supabase" only, but it seems very hard for me to rephrase it in a more general manner.
The extension should not make any pop-up. Errors should be given back to extension users to let them handle the errors as they want.
I'll try to fix this.
Hello @romw314, sorry for pinging.
I have tried to use the extension early. It signs in properly but this pops up when I save data and nothing gets saved...
Maybe you have not set up your database properly, @EyadMahm0ud
@romw314 I read the help page for the extension and it turns out that I need to apply a specific configuration. I might add some functions (like filtering and OTP authentication) with some flexibility so that there is no need for configuration. I might fulfill D8H demands and upload the extension here too.