@osjs/sqlite-auth

OS.js v3 sqlite authentication provider

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
10Aug 12, 2018Apr 23, 2018Minified + gzip package size for @osjs/sqlite-auth in KB

Readme

OS.js Logo

OS.js is an open-source desktop implementation for your browser with a fully-fledged window manager, Application APIs, GUI toolkits and filesystem abstraction.

Community Donate Donate Support

OS.js v3 Sqlite Auth Provider

This is the Sqlite Auth Provider for OS.js v3

Usage

IT IS HIGHLY RECOMMENDED THAT YOU USE https://github.com/os-js/osjs-database-auth INSTEAD

Server

In your server bootstrap script (src/server/index.js) modify the provider registration:

const sqliteAuth = require('@osjs/sqlite-auth');

core.register(AuthServiceProvider, {
  args: {
    adapter: sqliteAuth.adapter,
    config: {
      // Custom Database path
      //database: '/data/osjs.sqlite',
    }
  }
});

CLI

To get CLI commands to manage users, you'll have to modify your CLI bootstrap script (src/cli/index.js):

const sqliteAuth = require('@osjs/sqlite-auth');

const sqliteCli = sqliteAuth.cli({
  // Custom Database path
  //database: '/data/osjs.sqlite',
});

module.exports = [sqliteCli];

You can no manage users with ex. npx osjs-cli <task>

Available tasks:

  • user:list - Lists users
  • user:add --username=STR - Adds user
  • user:pwd --username=STR - Changes user password
  • user:remove --username=STR - Removes user

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.