A (Deno)[https://deno.land/] app for basic authentication using MongoDB.
git clone https://github.com/nickpersad/deno-auth.git
cd deno-auth
#Copy default config file and add your config variables
cp config.default.ts config.ts
#Run Deno, downloading any dependencies needed to cache
make (or deno -A --unstable index.ts)
Your app should now be running on localhost:4000 or whatever you set in config.ts.
All requests must be POST requests, GET requests are forbidden.
Only allows unique users, if a user exist, the user will be rejected. Passwords are hashed using [bcrypt] (https://en.wikipedia.org/wiki/Bcrypt). Sample request
{
"username": "[email protected]",
"password": "qwerty123456"
}
Sample response
{
"success": true,
"id": "5eb1a808b6228ew2b582ds19"
}
Sample request
{
"username": "[email protected]",
"password": "qwerty123456"
}
Sample response
{
"success": true,
"id": "5eb1a808b6228ew2b582ds19"
}
Sample request
{}
Sample response
{
"success": true,
"results": [
{
"id": "22966r34df38a67003e55c11",
"username": "[email protected]"
},
{
"id": "5496921c990295718393a896",
"username": "[email protected]"
}
]
}
Sample request
{
"username": "[email protected]"
}
Sample response
{
"success": true
}