lokey.js
TypeScript icon, indicating that this package has built-in type declarations

0.1.15 • Public • Published

Lokey

This project is a TypeScript-based authentication system, utilizing JWT (JSON Web Tokens) for secure user authentication. It provides a class Lokey that handles the authentication process, including token storage, retrieval, validation, and refresh.

Installation

npm i lokey.js

Usage

The main class in this project is Lokey. It provides methods for handling the authentication process.

Here's a basic example of how to use it:

import {Lokey} from './lokey';

const lokey = Lokey.getInstance();

lokey.init({
    auth_service_url: "http://localhost:10010/auth",
    client_id: "inner",
    redirect_url: "http://localhost:4200"
}).then(payload => {
    console.log(payload);
    console.log(lokey.access_token);
}).catch(err => {
    console.error(err);
});

Built With

  • TypeScript - The main programming language used.
  • JOSE - Used for JWT decoding.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Readme

Keywords

none

Package Sidebar

Install

npm i lokey.js

Weekly Downloads

5

Version

0.1.15

License

none

Unpacked Size

1.14 MB

Total Files

24

Last publish

Collaborators

  • irwinjuice