moc-oauth-client 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -3
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,7 +66,7 @@ console.log(result);
|
|
|
66
66
|
✅ Validate Access Token
|
|
67
67
|
|
|
68
68
|
```typescript
|
|
69
|
-
const result = await oauth.
|
|
69
|
+
const result = await oauth.validateAuthorizationCode(code);
|
|
70
70
|
|
|
71
71
|
console.log(result);
|
|
72
72
|
```
|
|
@@ -78,7 +78,12 @@ console.log(result);
|
|
|
78
78
|
"data": {
|
|
79
79
|
"isValid": true,
|
|
80
80
|
"accessToken": "...",
|
|
81
|
-
"refreshToken": "..."
|
|
81
|
+
"refreshToken": "...",
|
|
82
|
+
"domain": "...",
|
|
83
|
+
"id": "...",
|
|
84
|
+
"email": "...",
|
|
85
|
+
"username": "...",
|
|
86
|
+
"isActive": "..."
|
|
82
87
|
},
|
|
83
88
|
"error": null
|
|
84
89
|
}
|
|
@@ -144,7 +149,7 @@ Example handling:
|
|
|
144
149
|
|
|
145
150
|
```typescript
|
|
146
151
|
try {
|
|
147
|
-
await oauth.
|
|
152
|
+
await oauth.validateAuthorizationCode(code);
|
|
148
153
|
} catch (error) {
|
|
149
154
|
console.error(error.error.message);
|
|
150
155
|
}
|
package/dist/index.js
CHANGED