@0xmonaco/react 0.0.0-develop-20260318132113 → 0.0.0-develop-20260412233650

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.
@@ -25,6 +25,6 @@ export interface UseAuthReturn extends UseAuthState {
25
25
  authenticate: () => Promise<AuthState>;
26
26
  /** Refresh access token. Pass the refreshToken from authState. */
27
27
  refreshToken: (refreshToken: string) => Promise<TokenRefreshResponse>;
28
- /** Revoke refresh token. Pass authState.refreshToken from authState.login() response. */
29
- revokeToken: (refreshToken: string) => Promise<void>;
28
+ /** Revoke the current session's refresh token on the server. */
29
+ revokeToken: () => Promise<void>;
30
30
  }
@@ -113,14 +113,12 @@ export const useAuth = () => {
113
113
  throw error;
114
114
  }
115
115
  }, [sdk, setAuthenticationStatus]);
116
- const revokeToken = useCallback(async (token) => {
116
+ const revokeToken = useCallback(async () => {
117
117
  if (!sdk)
118
118
  throw new Error("SDK not available");
119
- if (!token?.trim())
120
- throw new Error("Refresh token is required and cannot be empty");
121
119
  setAuthenticationStatus(AuthenticationStatus.AUTHENTICATING);
122
120
  try {
123
- await sdk.auth.revokeToken(token);
121
+ await sdk.auth.revokeToken();
124
122
  const authenticated = sdk.isAuthenticated();
125
123
  setAuthenticationStatus(authenticated ? AuthenticationStatus.AUTHENTICATED : AuthenticationStatus.UNAUTHENTICATED);
126
124
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xmonaco/react",
3
- "version": "0.0.0-develop-20260318132113",
3
+ "version": "0.0.0-develop-20260412233650",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,14 +14,14 @@
14
14
  "dist"
15
15
  ],
16
16
  "scripts": {
17
- "build": "tsc -b --force",
17
+ "build": "tsc -b",
18
18
  "dev": "tsc --watch",
19
19
  "clean": "rm -rf dist",
20
20
  "lint": "biome lint ."
21
21
  },
22
22
  "dependencies": {
23
- "@0xmonaco/core": "0.0.0-develop-20260318132113",
24
- "@0xmonaco/types": "0.0.0-develop-20260318132113"
23
+ "@0xmonaco/core": "0.0.0-develop-20260412233650",
24
+ "@0xmonaco/types": "0.0.0-develop-20260412233650"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/react": "^19.1.12",