Skip to content

v2.16.0

Compare
Choose a tag to compare
@0xFirekeeper 0xFirekeeper released this 17 Jan 19:38
· 5 commits to main since this release
5348711

What's Changed

AuthProvider.SiweExternal - SIWE, OAuth style

Depending on the framework, or on the external wallet platform support, you may not have direct access to every single wallet out there.
This new AuthProvider allows you to login to otherwise native-unavailable wallets such as Abstract Wallet & Coinbase Smart Wallet through a flow similar to OAuth, using SIWE.

It'll redirect you to static.thirdweb.com and use our React SDK and other wallet SDKs as needed, unlocking the ability to login (or link) with any wallet thirdweb supports on web, from runtime platforms that would otherwise be unsupported by said wallet, and create an In-App or Ecosystem Wallet out of it.

Windows Console Example:

var inAppWalletSiweExternal = await InAppWallet.Create(client: client, authProvider: AuthProvider.SiweExternal);
var address = await inAppWalletSiweExternal.LoginWithSiweExternal(
    isMobile: false,
    browserOpenAction: (url) =>
    {
        var psi = new ProcessStartInfo { FileName = url, UseShellExecute = true };
         _ = Process.Start(psi);
    },
    forceWalletIds: new List<string> { "io.metamask", "com.coinbase.wallet", "xyz.abs" }
);

You can now override the default session id used with Guest authentication

This is useful when you want your guest mode to be tied to a unique device identifier, and depending on your framework there may be various APIs to fetch such identifiers that you may want to use.

Example:

var guestWallet = await EcosystemWallet.Create(
    ecosystemId: "ecosystem.the-bonfire",
    client: client,
    authProvider: AuthProvider.Guest
);
var address = await guestWallet.LoginWithGuest(SomeSystemInfoAPI.deviceUniqueIdentifier);