Skip to content

Releases: magiclabs/magic-admin-js

v2.4.1

23 Apr 16:00
Compare
Choose a tag to compare

🐛 Bug Fix

Authors: 1

v2.4.0

04 Apr 23:03
Compare
Choose a tag to compare

🚀 Enhancement

Authors: 1

v2.3.0

04 Apr 21:50
Compare
Choose a tag to compare

🚀 Enhancement

Authors: 2

v2.2.0

03 Apr 18:15
Compare
Choose a tag to compare

🚀 Enhancement

🐛 Bug Fix

  • Pdeexp 594 update admin sdk dependency versions to support web 3 #123 (@Ethella)

Authors: 2

v2.1.0

19 Jan 20:14
Compare
Choose a tag to compare

🚀 Enhancement

Authors: 1

v2.0.1

04 Oct 21:11
Compare
Choose a tag to compare

🐛 Bug Fix

Authors: 1

v2.0.0

10 Jul 18:14
Compare
Choose a tag to compare

Summary

  • 🚀 Added: Magic Connect developers can now use the Admin SDK to validate DID tokens. #111 (@magic-ravi)
  • ⚠️ Changed: After creating the Magic instance, it is now necessary to call a new initialize method for Magic Connect developers that want to utilize the Admin SDK. #111 (@magic-ravi)
  • 🛡️ Security: Additional validation of aud (client ID) is now being done during initialization of the SDK. #111 (@magic-ravi)

Developer Notes

🚀 Added

Admin SDK for MC

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.

⚠️ Changed

Constructor initialization

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);
}

Attachment Validation

  • Skip validation of attachment if 'none' is passed in validate.

🛡️ Security

Client ID Validation

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.

🚨 Breaking

None, all changes are fully backwards compatible. Default constructor is now deprecated in place of async init method.

Authors: 1

v1.10.1

07 Jul 23:21
Compare
Choose a tag to compare

🐛 Bug Fix

Authors: 1

v1.10.0

03 May 15:08
Compare
Choose a tag to compare

🚀 Enhancement

Authors: 1

v1.9.2

24 Mar 22:57
Compare
Choose a tag to compare

🐛 Bug Fix

Authors: 1