The Problem:
The code bellow throws a Unhandled Runtime Error Error: Magic RPC Error: [-32603] Internal error: Unsupported Magic Connect method and I cannot figure out why.
node version : 18.12.1
magic-sdk version: ^8.1.1
nextjs13
import { Magic } from 'magic-sdk';
const magic = new Magic(process.env.NEXT_PUBLIC_MAGIC_PUBLISHABLE_KEY);
try {
magic.auth.loginWithMagicLink({ email });
const didToken = await magic.auth.loginWithMagicLink({
email,
});
console.log({ didToken });
}
} catch (error) {
console.log(error);
}
I have tried downgrading the magic-sdk version to 8.1.1 with node version to 18.12.1 but the problem still persists
The expected behavior is for the code to send a magic link to the users email and the user should use that magic link to login into the application