diff --git a/lib/surreal.ts b/lib/surreal.ts
index e4f78dc..2597a0b 100644
--- a/lib/surreal.ts
+++ b/lib/surreal.ts
@@ -8,6 +8,7 @@ import {
     ConnectionStatus,
     ConnectionUnavailable,
     AbstractEngine,
+    EngineAuth,
     UnexpectedConnectionError,
     type EngineEvents,
     type RpcRequest,
@@ -67,6 +68,7 @@ export function surrealdbWasmEngines(opts?: ConnectionOptions): Engines {
                 );
 
                 this.db = db;
+				await this.context.prepare?.(new EngineAuth(this))
                 this.setStatus(ConnectionStatus.Connected);
 
                 this.reader = (async () => {
@@ -221,4 +223,4 @@ export function surrealdbWasmEngines(opts?: ConnectionOptions): Engines {
         mem: WasmEmbeddedEngine,
         indxdb: WasmEmbeddedEngine,
     };
-}
+}
\ No newline at end of file
diff --git a/package.json b/package.json
index ad7b1b7..4cdcb9e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
     "name": "@surrealdb/wasm",
-    "version": "1.2.0",
+    "version": "1.3.0",
     "description": "WebAssembly driver for SurrealDB",
     "repository": {
         "type": "git",
@@ -36,6 +36,6 @@
         "typescript": "^5.4.5"
     },
     "peerDependencies": {
-        "surrealdb": "^1.2.0"
+        "surrealdb": "^1.3.1"
     }
 }
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 87e277c..0b57f8c 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -9,8 +9,8 @@ importers:
   .:
     dependencies:
       surrealdb:
-        specifier: ^1.2.0
-        version: 1.2.0(tslib@2.6.3)(typescript@5.4.5)(ws@8.16.0(bufferutil@4.0.8)(utf-8-validate@6.0.3))
+        specifier: ^1.3.1
+        version: 1.3.1(tslib@2.6.3)(typescript@5.4.5)(ws@8.16.0(bufferutil@4.0.8)(utf-8-validate@6.0.3))
     devDependencies:
       dts-bundle-generator:
         specifier: ^9.5.1
@@ -231,8 +231,8 @@ packages:
     resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==}
     engines: {node: '>=8'}
 
-  surrealdb@1.2.0:
-    resolution: {integrity: sha512-3r/045+l6dfRY3RhshuJoI/vF+rvDnoxaggTqKbeb397Ws0IVlfTI+mVG+Lo3lMOP0G3r7ild/Z7RtQlXlkIew==}
+  surrealdb@1.3.1:
+    resolution: {integrity: sha512-HAA5SesvgyHCpQokNBvcT1esRV+dqYg5ZyXY+nFB/RO0xbmvSovLMSvntUtIpuDYehc9vmSNs/g0d78MoiwOKg==}
     engines: {node: '>=18.0.0'}
     peerDependencies:
       tslib: ^2.6.3
@@ -432,7 +432,7 @@ snapshots:
     dependencies:
       ansi-regex: 5.0.1
 
-  surrealdb@1.2.0(tslib@2.6.3)(typescript@5.4.5)(ws@8.16.0(bufferutil@4.0.8)(utf-8-validate@6.0.3)):
+  surrealdb@1.3.1(tslib@2.6.3)(typescript@5.4.5)(ws@8.16.0(bufferutil@4.0.8)(utf-8-validate@6.0.3)):
     dependencies:
       isows: 1.0.6(ws@8.16.0(bufferutil@4.0.8)(utf-8-validate@6.0.3))
       tslib: 2.6.3