Add Ethereum & NFT Login
Login with NFTs help developers build Web3 apps without blockchain knowledge
Sign In With Ethereum(also known as SIWE) introduces a new way of authenticating and identification of a user using their crypto-wallet addresses. Authgear saves you from all the complex setups and brings you the technology of the future with just a simple click.
Platform support
The Sign In With Ethereum standard is built on the EIP-4361 specification, which is typically performed on Web3 providers.
To make this as simple as possible, the following mainstream consumer-facing web3 providers are selected to be the gateway connecting your application and users.
These providers are typically supported by browsers with WebExtensions API, namely Chrome, Firefox, Edge, and Brave.
Supported NFTs
To assist you in building the greatest NFT-gated application ever, Authgear adds extra information to the user info that indicates whether the user owns NFT/NFTs of your selected NFT collection.
At the current stage, the following token types are supported:
Wallet address and NFTs in UserInfo
In the UserInfo
object of a user, the wallet address and the NFTs owned can be found.
Here is an example of such user:
Add Sign In With Ethereum to your apps with Authgear
To enable "Sign In With Ethereum" to your apps and websites:
In your project portal, go to "Authentication > Ethereum & NFT"
Turn on the "Login With Ethereum" toggle
Select your favourite blockchain network from the "Network" dropdown below
To prevent Web2 and Web3 identities being mixed together, Authgear has made it so that enabling "Sign In With Ethereum" would disable all your previously enabled identities and primary authenticators.
To go back to using Web2 authentication methods, you will have to disable "Sign In With Ethereum" and reconfigure your identities and authenticators.
Add NFT collections to your apps with Authgear
To populate user info with NFT tokens from the collections of your choice:
In your project portal, go to "Authentication > Ethereum & NFT"
Ensure "Login With Ethereum" toggle is checked
Select the blockchain network from the "Network" for where your NFT collection is based on
In the "NFT Collections" section, press "Add Collection", this will add an extra text field to the section
Enter the contract address of the NFT collections in the "Contract Address" text field
Select the token type of the contract address
In the case of an ERC-1155 being selected, you will be prompted with a token tracking dialog
Enter the desire token IDs and press "Continue"
Press "Add" and you will see your collection is now in the pending collection list
If an error is shown that states that your NFT collection is not supported, it is possible that the collection has an alternative implementation of the ERC-721 or ERC-1155 standard
Once the collection starts being monitored, it will take a few minutes for Authgear to synchronize the NFT tokens for your users.
Last updated