Skip to content

Commit 952fb0c

Browse files
authored
Merge pull request #13 from kotontrion/feat/pam
2 parents 0e3937d + 07ebf4d commit 952fb0c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/content/docs/config/utils.md

+18
Original file line numberDiff line numberDiff line change
@@ -236,3 +236,21 @@ Utils.fetch('http://wttr.in/?format=3')
236236
.then(print)
237237
.catch(console.error)
238238
```
239+
240+
## Authentication
241+
242+
authenticate a user using pam
243+
244+
:::note
245+
on NixOS make sure you have `security.pam.services.ags = {}` in `configuration.nix`
246+
:::
247+
248+
```js
249+
Utils.authenticate('password')
250+
.then(() => print('authentication sucessful'))
251+
.catch(err => logError(err, 'unsucessful'))
252+
253+
Utils.authenticateUser("username", "password")
254+
.then(() => print("authentication sucessful"))
255+
.catch(err => logError(err, 'unsucessful'))
256+
```

0 commit comments

Comments
 (0)