Skip to content
← Back to Community
How to make a login system?
Profile icon
Cooolcoder

I want to make a login system for my site, but I also want a database where I can store all the usernames and passwords. Is there any repl that I can fork?

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
Profile icon
OlieksiiMoroz
Profile icon
Cooolcoder
Comments
hotnewtop
Profile icon
Coder100

You can use repl.it db to do it. Align your database so it looks like this:

username: { password <other info if you want> }

so something like:

from replit import db db['INSERT USERNAME HERE'] = { 'password': 'INSERT PASSWORD HERE', }

and then to log in:

from replit import db db['INSERT USERNAME HERE']['password'] == 'INSERT USER INPUTTED PASSWORD HERE'

easy, right?

Profile icon
Cooolcoder

@Coder100 thank you!

Profile icon
Coder100

np! mark as correct answer please! @Cooolcoder

Profile icon
Cooolcoder
Profile icon
Coder100

thanks :) @Cooolcoder

Profile icon
RYANTADIPARTHI

Use the repl.it db to store all your info and to save. Try this link to learn about it:

https://docs.repl.it/misc/database

Profile icon
programmeruser