Magic admin Node.js SDK makes it easy to leverage Decentralized ID tokens to protect routes and restricted resources for your application.
MIT License
Bot releases are hidden (Show)
Published by Ethella 7 months ago
Published by Ethella 7 months ago
Published by Ethella 7 months ago
Published by Ethella 9 months ago
Published by magiclabsFE over 1 year ago
aud
(client ID) is now being done during initialization of the SDK. #111 (@magic-ravi)Magic Connect developers can now use the Admin SDK to validate DID tokens.
Details
There is full support for all TokenResource
SDK methods for MC. This is intended to be used with client side magic-js
SDK which will now emit an id-token-created
event with a DID token upon login via the connectWithUI
method.
This functionality is replicated on our other SDKs on Python and Ruby.
The existing constructor has been deprecated in place of a new async init
method.
The init
method will pull clientId from Magic servers if one is not provided in the options
parameter.
Previous Version
const magic = new Magic(secretKey);
try {
magic.token.validate(DIDT);
} catch (e) {
console.log(e);
}
try {
await magic.users.getMetadataByToken(DIDT);
} catch (e) {
console.log(e);
}
Current Version
const magic = await Magic.init(mcSecretKey);
try {
magic.token.validate(DIDT);
} catch (e) {
console.log(e);
}
try {
await magic.users.getMetadataByToken(DIDT);
} catch (e) {
console.log(e);
}
validate
.Additional validation of aud
(client ID) is now being done during initialization of the SDK. This is for both Magic Connect and Magic Auth developers.
None, all changes are fully backwards compatible. Default constructor is now deprecated in place of async init
method.
Published by magiclabsFE over 1 year ago
Published by magiclabsFE over 1 year ago
Published by magiclabsFE over 1 year ago
Published by magiclabsFE over 1 year ago
Published by justinnout almost 2 years ago
Published by smithki over 2 years ago
master
Published by smithki almost 3 years ago
Published by smithki almost 4 years ago
nbf
field #40 (@smithki)master