Manually verifying magic link token throws unexpected invalid_type

In my Expo mobile app, I'm trying to verify the magic link token manually as described here.
But when I try to call the verify method with my token, I receive the following error:
{"code": "______CODE_INVALID_TYPE____EXPECTED_STRING____RECEIVED_UNDEFINED____PATH_______TOKEN________MESSAGE_REQUIRED__", "details": [{"code": "invalid_type", "expected": "string", "message": "Required", "path": [Array], "received": "undefined"}], "message": "[
  {
    \"code\": \"invalid_type\",
    \"expected\": \"string\",
    \"received\": \"undefined\",
    \"path\": [
      \"token\"
    ],
    \"message\": \"Required\"
  }
]", "status": 400, "statusText": ""}


and this is my code setup:
import * as SecureStore from 'expo-secure-store'
import { createAuthClient } from 'better-auth/react'
import { expoClient } from '@better-auth/expo/client'
import { magicLinkClient } from 'better-auth/client/plugins'

export const auth = createAuthClient({
    baseURL: process.env.EXPO_PUBLIC_API_URl,
    plugins: [magicLinkClient(), expoClient({ storage: SecureStore })],
})

auth.magicLink.verify({ query: { token: 'inserted_valid_token' } }).then((res) => console.log(res.error))

I can verify that we're actually sending a token as string.
Anyone has any idea perhaps?
Thanks!
Magic link plugin
Was this page helpful?