How to make an account system (php ig)

Oh, there’s no php ReplAuth sadly! The ones that are currently available are :

  • NodeJS
  • Flask

Then I need to make a custom account system

Yeah, sorry. Maybe there’ll be a PHP Repl Auth someday!

2 Likes

All available (except replit), unless you want to make your own.

i want to make my own bc i think it will be easier to make the game sharing feature

You don’t need to wait for PHP Repl Auth anymore! Check this out! (If you can’t tell, I’m pretty proud of myself right now)

It’s very simple, it works the same as the NodeJS NPM package. Basically, you just read all the headers starting with X_REPLIT_USER_ and put them in an associative array. :slight_smile:

I don’t need an account system, i need a game sharing system, so that you can share games in html zip

Then you need the user to be able to upload functioning HTML ZIP files. I read recently that you can actually run HTML files from ZIP with a special JS (without this the files can’t find each other). That, or each user could have their own folder in your site.

why unlisted?

Check your messages!

If you don’t know PHP then why are you using it? There are alternatives.

what do you recommend for a game sharing website?

I just figured out today while helping somebody else that you can use Python Flask to make an account system (see my post). So, if you know Python, you can do that (and Replit auth is not the only way because we could use Replit secrets to keep passwords secure for a normal account system). And there’s probably a way to do it using NodeJS, but I don’t really know JavaScript so I can’t help with that.

It was surprisingly simple turning the Replit Auth Flask template into an account system. Using HTML input boxes, we could allow the user to add themself to the text file full of users instead of having to do it manually. I’m not saying that PHP isn’t the best option, I’m just saying if you know a different language that’s capable, why not use it instead?

i need a custom account system because it wil be easier to make profile pages and the game sharing

I will work on that. Maybe somebody else will have an answer too.

Okay I am making progress on an account system but this takes more time than I have. I hope that somebody else will be able to be more helpful to you.

Lucky for you I already have a custom account system that you can fork:

https://replit.com/@QwertyQwerty54/Login-System

@QwertyQwerty88 That’s where I was going. Since this is finished and mine is not I will fork this. Great work!

1 Like

Thanks, and I notice yours is much better commented than mine (I don’t usually comment my code) so I’ll try to make it better

1 Like

Could you fix it so that if you log in when you don’t have an account it doesn’t take you to the INTERNAL SERVICE ERROR page? That would be great.

1 Like