diff --git a/bun.lockb b/bun.lockb index 70a951b0..abb63944 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/plugins/social/package.json b/plugins/social/package.json index 3679cf5c..03d9b7b5 100644 --- a/plugins/social/package.json +++ b/plugins/social/package.json @@ -39,7 +39,7 @@ "viem": "^2.28.0" }, "dependencies": { - "@magic-ext/oauth": "^22.0.3", + "@magic-ext/oauth2": "^13.0.0", "magic-sdk": "^28.0.3" }, "type": "module" diff --git a/plugins/social/toSocialValidatorPlugin.ts b/plugins/social/toSocialValidatorPlugin.ts index 0ca094c0..dca3f538 100644 --- a/plugins/social/toSocialValidatorPlugin.ts +++ b/plugins/social/toSocialValidatorPlugin.ts @@ -1,4 +1,4 @@ -import { OAuthExtension } from "@magic-ext/oauth" +import { OAuthExtension } from "@magic-ext/oauth2" import { signerToEcdsaValidator } from "@zerodev/ecdsa-validator" import type { EntryPointType, @@ -20,7 +20,7 @@ export async function isAuthorized({ const isLoggedIn = await magic.user.isLoggedIn() if (isLoggedIn) return true - const result = await magic.oauth.getRedirectResult() + const result = await magic.oauth2.getRedirectResult() return result !== null } catch {} return false @@ -37,7 +37,7 @@ export async function initiateLogin({ }) { const magic = await getMagic({ projectId }) - magic.oauth.loginWithRedirect({ + magic.oauth2.loginWithRedirect({ provider: socialProvider, redirectURI: oauthCallbackUrl ?? window.location.href })