1.0.23 • Published 2 years ago

splinterlands-auth v1.0.23

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years 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

2 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.20

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.20-alpha

3 years ago

1.0.9

3 years ago

0.0.18-alpha

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

0.0.19-alpha

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

0.0.16-alpha

3 years ago

1.0.12

3 years ago

0.0.15-alpha

3 years ago

0.0.13-alpha

3 years ago

0.0.11-alpha

3 years ago

0.0.10-alpha

3 years ago

0.0.9-alpha

3 years ago

0.0.8-alpha

3 years ago

0.0.7-alpha

3 years ago

0.0.6-alpha

3 years ago

0.0.5-alpha

3 years ago

0.0.4-alpha

3 years ago

0.0.3-alpha

3 years ago

0.0.2-alpha

3 years ago

0.0.1-alpha

3 years ago