You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+75Lines changed: 75 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,78 @@
1
+
# v2.0.0 (July 10, 2023)
2
+
3
+
## Summary
4
+
- 🚀 **Added:** Magic Connect developers can now use the Admin SDK to validate DID tokens. [#111](https://github.com/magiclabs/magic-admin-js/pull/111) ([@magic-ravi](https://github.com/magic-ravi))
5
+
- ⚠️ **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](https://github.com/magiclabs/magic-admin-js/pull/111) ([@magic-ravi](https://github.com/magic-ravi))
6
+
- 🛡️ **Security:** Additional validation of `aud` (client ID) is now being done during initialization of the SDK. [#111](https://github.com/magiclabs/magic-admin-js/pull/111) ([@magic-ravi](https://github.com/magic-ravi))
7
+
8
+
## Developer Notes
9
+
10
+
### 🚀 Added
11
+
12
+
#### Admin SDK for MC
13
+
Magic Connect developers can now use the Admin SDK to validate DID tokens.
14
+
15
+
**Details**
16
+
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.
17
+
18
+
This functionality is replicated on our other SDKs on Python and Ruby.
19
+
20
+
### ⚠️ Changed
21
+
22
+
#### Constructor initialization
23
+
24
+
The existing constructor has been deprecated in place of a new async `init` method.
25
+
The `init` method will pull clientId from Magic servers if one is not provided in the `options` parameter.
26
+
27
+
**Previous Version**
28
+
```javascript
29
+
constmagic=newMagic(secretKey);
30
+
try {
31
+
magic.token.validate(DIDT);
32
+
} catch (e) {
33
+
console.log(e);
34
+
}
35
+
try {
36
+
awaitmagic.users.getMetadataByToken(DIDT);
37
+
} catch (e) {
38
+
console.log(e);
39
+
}
40
+
```
41
+
42
+
**Current Version**
43
+
```javascript
44
+
constmagic=awaitMagic.init(mcSecretKey);
45
+
try {
46
+
magic.token.validate(DIDT);
47
+
} catch (e) {
48
+
console.log(e);
49
+
}
50
+
try {
51
+
awaitmagic.users.getMetadataByToken(DIDT);
52
+
} catch (e) {
53
+
console.log(e);
54
+
}
55
+
```
56
+
57
+
#### Attachment Validation
58
+
59
+
- Skip validation of attachment if 'none' is passed in `validate`.
60
+
61
+
### 🛡️ Security
62
+
63
+
#### Client ID Validation
64
+
65
+
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.
66
+
67
+
68
+
### 🚨 Breaking
69
+
70
+
None, all changes are fully backwards compatiable.
71
+
72
+
### Authors: 1
73
+
74
+
- Ravi Bhankharia ([@magic-ravi](https://github.com/magic-ravi))
0 commit comments