-
Notifications
You must be signed in to change notification settings - Fork 67
New extension: Pocketbase #1863
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
base: main
Are you sure you want to change the base?
Conversation
|
!update Example project: Extension: I fixed a bug in the example project and the extension that was causing it to break. |
|
❗ An internal error has occurred. See logs at https://github.com/GDevelopApp/GDevelop-extensions/actions/runs/18437661516. |
|
!update |
|
❗ An internal error has occurred. See logs at https://github.com/GDevelopApp/GDevelop-extensions/actions/runs/18437700292. |
|
!update |
|
❗ An internal error has occurred. See logs at https://github.com/GDevelopApp/GDevelop-extensions/actions/runs/18437748467. |
|
!update |
|
❗ An internal error has occurred. See logs at https://github.com/GDevelopApp/GDevelop-extensions/actions/runs/18437789634. |
|
!update |
|
❗ An internal error has occurred. See logs at https://github.com/GDevelopApp/GDevelop-extensions/actions/runs/18437822563. |
|
!update |
|
❗ An internal error has occurred. See logs at https://github.com/GDevelopApp/GDevelop-extensions/actions/runs/18437836234. |
|
!update |
|
❗ An internal error has occurred. See logs at https://github.com/GDevelopApp/GDevelop-extensions/actions/runs/18437890558. |
|
!update Pocketbase.json |
|
❗ An internal error has occurred. See logs at https://github.com/GDevelopApp/GDevelop-extensions/actions/runs/18437921719. |
|
!update |
|
❗ No updates found. Please check your file. |
|
!update Pocketbase extension.zip |
|
❗ No updates found. Please check your file. |
|
!update |
|
❗ No updates found. Please check your file. |
|
!update |
|
❗ No updates found. Please check your file. |
|
!update |
|
❗ No updates found. Please check your file. |
|
!update |
|
❗ No updates found. Please check your file. |
|
!update |
|
❗ No updates found. Please check your file. |
|
!update |
|
❗ No updates found. Please check your file. |
|
!update |
|
❗ No updates found. Please check your file. |
|
!update |
|
❗ An internal error has occurred. See logs at https://github.com/GDevelopApp/GDevelop-extensions/actions/runs/18438487725. |
|
!updatePocketbase extension.zip |
|
❗ No updates found. Please check your file. |
|
!update |
|
❗ No updates found. Please check your file. |
|
!update |
|
✅ Successfully updated the extension. |
|
!update |
|
❗ An internal error has occurred. See logs at https://github.com/GDevelopApp/GDevelop-extensions/actions/runs/18438687346. |
|
!updatePocketbase example.zip |
|
❗ An internal error has occurred. See logs at https://github.com/GDevelopApp/GDevelop-extensions/actions/runs/18438715649. |
|
❗ An internal error has occurred. See logs at https://github.com/GDevelopApp/GDevelop-extensions/actions/runs/18440268233. |
|
Thank you for submitting an extension. The up to date example is directly downloaded by reviewers to check the extension. You don't have to use the update command for the new example since the PR only contains the extension. |
840ff04 to
8a4233e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The extension doesn't use the authentication token for operations on the database which greatly decreases the value of authentication. I've written some notes on multiple other aspects that could be improved.
I didnt write a direct comment about it, and since it'd probably be a community extension it'd likely be fine, but ideally it would be nice to have clearer & cleaner variable names.
| }, | ||
| "parameters": [ | ||
| "URL", | ||
| "\"{\\\"email\\\":\\\"\" + (email) + \"\\\",\\\"password\\\":\\\"\" + (password) + \"\\\",\\\"passwordConfirm\\\":\\\"\" + (password) + \"\\\"}\"", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's an unideal way of doing things, it'll break i the user enters a password with a " for example...
It probably would be better to have an extension variable with the correct shape, set the properties on it, and ToJSON it
| }, | ||
| { | ||
| "async": true, | ||
| "description": "The url link to signing up, needs to have \"/api/collections/users/records\". For example \"http://127.0.0.1:8090/api/collections/users/records\".", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not a very intuitive interface, it probably would be better to take a user collection name as argument instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you talking about the /api/collections/users/records? You must put that in your link, else Pocketbase wont register that users are even trying to sign up for you server. And i didn't use javacode or any of that. I used Send a request to a web action, so i don't know about that "argument" part.
| { | ||
| "type": { | ||
| "value": "EcrireFichierTxt" | ||
| }, | ||
| "parameters": [ | ||
| "\"ERROR\"", | ||
| "\"ROR\"", | ||
| "Error" | ||
| ] | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does the error need to be written to storage?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That, i just thought it would be better but does it matter? Is it illegal or?
| }, | ||
| "parameters": [ | ||
| "URL", | ||
| "\"{\\\"id\\\":\\\"\" + (UserID) + \"\\\",\\\"Var\\\":\\\"\" + (Var) + \"\\\"}\"", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will not work with structured variables.
it's also losing out on the features of pocketbase by not giving users control of their database schema, and a weird limitation to suggest forcing documents to be keyed by the user id instead of allowing an arbitrary key
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually done that because UserID is unique and cannot be duplicated. Plus Pocketbase forces users to use ID rather than tokens. I can't technically change it because i don't have control over that.
| "parameters": [ | ||
| { | ||
| "description": "Are you sure you want to log out?", | ||
| "name": "Are_you_sure", | ||
| "type": "yesorno" | ||
| } | ||
| ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thats completely useless, especially since we have no boolean expression anyways so the developer will always have to put in "yes" regardless of the interface presented to the user
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you're saying yes and no isn't a boolean like true or false? And if they're not what's the difference between yes and no to true and false?
| "objectGroups": [] | ||
| }, | ||
| { | ||
| "description": "Refreshes the user’s authentication token to keep their session active.\n(NOTE: Requires the AdvancedHTTP extension to use this action).", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you rely on another extension, try embedding the relevant functions into your extension as to make the dependency transparent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll see what i can do on my end, about that one
| "description": "Refreshes the user’s authentication token to keep their session active.\n(NOTE: Requires the AdvancedHTTP extension to use this action).", | ||
| "fullName": "Refresh token", | ||
| "functionType": "Action", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, refreshing the token should be done transparently in the background without the user having to worry about it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically Pocketbase mostly uses token 2 times. However if a user logs in to an account, it automatically gives the user a new token. So i just thought it will better if some people would like to have the token as some kind of security on top. But you're right Pocketbase doesn't use tokens that much.
Description
Hi everyone! Firebase is great, but its free plan is limited. For growing games, you’ll need a better solution.
Enter Pocketbase — a self-hosted, open-source, lightweight server in a single file. It includes:
Realtime database
Authentication
File storage
Admin dashboard
Pocketbase works on both Windows and Linux.
Here's quick vid to see example
Pocketbase.vid.example.show.mp4
How to use the extension
To learn how to use this extension, I highly recommend reading this forum post — it covers all the important details. No need to self-host when testing the example; I’m already hosting it for you.
https://forum.gdevelop.io/t/pocketbase-extension-self-hosted-server/72223?u=da-just
Checklist
What tier of review do you aim for your extension?
Reviewed
Example file
Pocketbase example.zip
Extension file
Pocketbase.extension.zip
Extension by @3mpk1ng
You can update the extension on this "Pull Request" by commenting the update command: in the comment field, type
!update, then drag and drop a zip file with your extension file in the commenting field, like how you initially submitted the extension. It should look like this:It can take a few seconds for the file to fully upload and show as the above. Once it is like shown above, click "Comment" and let the bot do the rest!