An open API service indexing awesome lists of open source software.

https://github.com/dinoscapeprogramming/authentication-package

A package you can use to create a user system with authentications
https://github.com/dinoscapeprogramming/authentication-package

Last synced: 8 months ago
JSON representation

A package you can use to create a user system with authentications

Awesome Lists containing this project

README

          

# Authentication Package
A package you can use to create a user system with authentications

## Documentation
### Setup
```js
const expressAuthentication = require('express-user-authentication');
```

### Create User
```js
expressAuthentication.createUser({
username: "Dinoscape",
password: "MyPassword",
data: {
type: "User"
}
});
```

### Edit User
```js
expressAuthentication.editUser({
username: "Dinoscape",
password: "MyPassword",
options: {
username: "DinoRunner",
password: "SecurePassword",
data: {
type: "Admin"
}
}
});
```

### Delete User
```js
expressAuthentication.deleteUser({
username: "DinoRunner",
password: "SecurePassword"
});
```

### Authentication
```js
app.on("/admin", expressAuthentication({
data: {
type: "Admin"
}
}), (req, res) => {
res.send("You are an admin!");
})
```