Authentication login system

how would i add a player login system for my game, so that players can save their data?

Just like your in-app purchases question, third party services would probably be the easiest. Google Firebase has a user authentication product that’s designed for games. There is also XSolla Login. I’m sure you could find dozens more.

You’ll have to make a developer account on whichever service you choose. They’ll assign you an API key and then you’ll have to follow their documentation to get it set up with your PlayCanvas game. Just remember that PlayCanvas is just JavaScript so if a third party service claims they support JavaScript, then they support PlayCanvas too.

1 Like

i have got firebase integrated, but when i test my signup script, i get an error: [signUp.js?id=69171283&branchId=592cf66f-1f7c-4700-aa14-1fa3822f3fab:43]: Uncaught ReferenceError: getDatabase is not defined
any idea on how to fix this?

It might be because you’re importing the wrong version of the Firebase SDK.
Check out this stackoverflow post.

i still get an error.
here is where the error is: const db = firebase.database(); set(ref(db, 'users/' + this.UserName), { username: this.UserName });
no the error is: [signUp.js?id=69171283&branchId=592cf66f-1f7c-4700-aa14-1fa3822f3fab:44]: Uncaught TypeError: firebase.database is not a function

It seems like firebase wasn’t set up properly. You should refer to the Firebase web setup documentation.

hmm sounds diffucult with saving
maybe if u made a whole cloud saving system
or find something that u can import

login is easy maybe a key to enter in

might need to do it where u can import saves locally also
but the user might need to drag and drop saves everytime or allow access to a folder everytime. chrome or a broswer to ask for?

just speculating