Is it possible to store logins in a json file?

For example:
{“ID”: “0021” { “JSONLOVER21”: { “pass”: “JS0N67” } } }
{“ID”: “0043” { “IluvCookies”: { “pass”: “Motorcycle87BNzXc” } } }

Yes. Using Node.js. But JSON files are prone to corruption.

4 Likes

Oh, i’ll just use the .env file then, thanks!

You also should not use that. You can use keyv with sqlite3 so you can store logins easily.

1 Like

Please use some sort of sql. Using JSON for credentials is a very bad idea.

1 Like

Definitely. Use a database - the filesystem is usually only a practical idea for logging/non-sensitive information.

4 Likes

If you use json- and someone manages to view the code for your site- your pretty much done for.

Use an SQL database engine OR a noSQL service like mongodb atlas.

3 Likes

The worst case is if a high-tech spy hacker (or just an ordinary nerd) looked trough the sources panel, it’s all over.

1 Like

yep, many can do that- even on mobile.

1 Like

and actually Khalby has a library for that, meet Jsoning
My friend actually needed something simple with files so I used jsoning for his discord bot db

2 Likes

I like regular JSON databases

but I’m no node guy

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.