Skip to content
This repository was archived by the owner on Dec 5, 2018. It is now read-only.

os-js/osjs-sqlite-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

OS.js v3 SQLite Authentication Module

Resources

License

Stars

Watchers

Forks

Packages

No packages published