@genation/sdk 0.2.7 → 0.2.8
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 +22 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -105,6 +105,28 @@ if (session) {
|
|
|
105
105
|
}
|
|
106
106
|
```
|
|
107
107
|
|
|
108
|
+
### `client.signOut()`
|
|
109
|
+
|
|
110
|
+
Sign out the current user and clear local session tokens.
|
|
111
|
+
|
|
112
|
+
```typescript
|
|
113
|
+
await client.signOut();
|
|
114
|
+
// Triggers "SIGNED_OUT" event
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### `client.verifyToken(token)`
|
|
118
|
+
|
|
119
|
+
Verify a JWT token signature using the public JWKS endpoint.
|
|
120
|
+
|
|
121
|
+
```typescript
|
|
122
|
+
try {
|
|
123
|
+
const payload = await client.verifyToken(accessToken);
|
|
124
|
+
console.log("Token is valid:", payload);
|
|
125
|
+
} catch (error) {
|
|
126
|
+
console.error("Token verification failed:", error);
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
108
130
|
## Session Object
|
|
109
131
|
|
|
110
132
|
```typescript
|