1.0.23 • Published 1 year ago

splinterlands-auth v1.0.23

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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!
}
1.0.23

1 year ago

1.0.22

1 year ago

1.0.21

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.20

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.20-alpha

2 years ago

1.0.9

2 years ago

0.0.18-alpha

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

0.0.19-alpha

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

0.0.16-alpha

2 years ago

1.0.12

2 years ago

0.0.15-alpha

2 years ago

0.0.13-alpha

2 years ago

0.0.11-alpha

2 years ago

0.0.10-alpha

2 years ago

0.0.9-alpha

2 years ago

0.0.8-alpha

2 years ago

0.0.7-alpha

2 years ago

0.0.6-alpha

2 years ago

0.0.5-alpha

2 years ago

0.0.4-alpha

2 years ago

0.0.3-alpha

2 years ago

0.0.2-alpha

2 years ago

0.0.1-alpha

2 years ago