New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

itsme

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

itsme

Unofficial ItsMe library

latest
Source
npmnpm
Version
1.2.5
Version published
Maintainers
1
Created
Source

node-itsme

Unofficial NodeJs itsme library used to authenticate users.

Simple example:

const ItsMe    = require('itsme');

async function main() {

    const itsme = new ItsMe({
        client_id: 'test account',
        auth_redirect: 'https://localhost:8080/itsme'
    });

    itsme.setKeys([
      enc_key,
      sig_key
    );

    //-----

    const authUrl = await itsme.authUrl('openid profile address phone service:PROJECT_LOGIN');

    console.log('Please sign in on the following url:')
    console.log(authUrl);
    console.log("");
    
    //-----
    //Once token received:

    const token = "...";
    const authResult = await itsme.parseAuthResponse(token)

    console.log("");
    console.log("Parsed auth response:")
    console.log(JSON.stringify(authResult, null, 4));
    console.log("")

    const userinfo = await itsme.userinfo( authResult.access_token );
    console.log("Received userinfo:")
    console.log(JSON.stringify(userinfo, null, 4));
}

main().catch(console.error)

Keywords

itsme

FAQs

Package last updated on 02 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts