Skip to content

Simpler authentication

Compare
Choose a tag to compare
@glasstiger glasstiger released this 28 Nov 21:30
· 9 commits to main since this release
45889a7

Previous versions of the client required the entire JWK for authentication.

const sender = new Sender({
    jwk: {
        kid: '<username>',
        d: '<private key>'
        x: '<public key x>',
        y: '<public key y>',
        kty: 'EC',
        crv: 'P-256'
    }
});

Starting with v2.1.0 the client supports a simpler way of authentication, where it is enough to specify only the username and the user's private key.

const sender = new Sender({
    auth: {
        keyId: '<username>',
        token: '<private key>'
    }
});