Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

splinterlands-auth

Package Overview
Dependencies
Maintainers
2
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

splinterlands-auth

Splinterlands library for authentication (backend + frontend)

  • 1.0.23
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

splinterlands-auth

Splinterlands library for authentication (backend + frontend)

  • modules/frontend should be used on the frontend to generate the required data
  • modules/backend should be used on the backend to verify the previously generated and then submitted data
// On the frontend

const auth = new Auth();
const result = await auth.frontend.hive(address);

if (result.status === 'success') {
  if(result.flow === 'hivesigner') {
    const { address, expiresIn, token } = result.data;
    // call endpoint and send address, token
  } else {
    const {sig, ts} = result. result.data
    // call endpoint and send address, sig, ts
  }
  
}

// On the backend
// if sig & ts
const result =  auth.backend.hive(address, sig, ts);
if(result.status === 'success') {
  // great success!
}

// if token
const result =  auth.backend.hivesigner(address, token);
if(result.status === 'success') {
  // great success!
}

FAQs

Package last updated on 16 Feb 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc