This package has been deprecated

Author message:

Please use @osjs/database-auth instead, sqlite standalone is deprecated

@osjs/sqlite-auth

1.1.2 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i @osjs/sqlite-auth

Weekly Downloads

0

Version

1.1.2

License

BSD-2-Clause

Unpacked Size

14.8 kB

Total Files

8

Last publish

Collaborators

  • andersevenrud