Auth makes use of a server-side wallet to sign and verify JWTs, as covered in the how auth works section. You can configure this wallet using a variety of wallet management options, giving you the freedom to choose the most convenient and secure setup for your project.
The easiest way to get started with Auth would be to use a simple private key or signer wallet directly. It's easy to use such a setup with just the core
Use the following installation to get started with Auth using a simple EVM private key or signer wallet:
Private Key Wallet
You can use an EVM private key (a 64 character hex-string) as your wallet by using the
PrivateKeyWallet class from the
You can also use any signer wallet compatible with the
ethers.Signer interface, such as the
For more advanced wallet setups like cloud wallets, managed private keys, and more, we have a variety of options available in our
@thirdweb-dev/wallets package. The package is an optional
@thirdweb-dev/auth, so you'll need to install it separately, along with any peer dependencies of the specific wallet you want to use.
For more information on the available wallets and the specific of their setup, see the
For example, here's how you would use a signing key from AWS Secrets Manager as your Auth wallet using the
@thirdweb-dev/wallets package (you would need to install its
@aws-sdk/client-secrets-manager peer dependency as well):
If none of the above methods are suitable for your project, you can also create your own custom wallet class by implementing the
GenericAuthWallet interface from the
@thirdweb-dev/wallets package for a completely custom setup.
Auth only requires the following simple wallet interface to facilitate signing and verification of JWTs:
You can see how this interface is chain agnostic, and can be used across different blockchain ecosystems.
For example, here is a minimal implementation of the basic
SignerWallet class from the
@thirdweb-dev/auth/evm entry point, which follows the