Many dApps already use Sign-In With Ethereum (SIWE) to authenticate their users. The WalletChat widget supports integrated sign-in so users do not have to sign-in to both the main site and widget.
Please reach out to contact@walletchat.fun or on Twitter @wallet_chat to learn more on pricing and integration steps! WalletChat can enable Integrated Sign-In/SSO for your domain for a short duration prior to payment if desired so you can try before you buy
Paid Tier Customer Streamline Options
Paid Tier customers can set the username and email address of the user within WalletChat.fun if already entered on the customer site. Reach out to contact@walletchat.fun to learn more and get an API Key. Paid Tier API key enables the /name functions outlined in more details at the API documentation: https://api.v2.walletchat.fun/docs/index.html
Paid Tier customers also get access to create users within WalletChat, to streamline new user experience. Terms and conditions apply.
Integration Steps
0) Create the WalletChat User via your Backend (Optional)
If you are using Integrated/Single Sign On - Streamlining the user login to WalletChat upon account creation is possible by creating the WalletChat user prior to performing the SSO steps. This way, when a user creates a profile on your site, they can be fully setup within WalletChat without having to enter the same username/email details in WalletChat!
Caveat: if users enter an ENS name like vitalik.eth, the wallet address used must match. WalletChat doesn't allow usernames to imitate ENS named not actually owned by the wallet.
This step is optional, and requires an API key from WalletChat Labs, Inc. Its only required once during profile creation, or profile updates. By using this you agree to the Terms and conditions to only modify users signed up on your site, and only use email addresses you have verified. Any abuse of these terms will result in revoking the API key without warning.
This step only is required for new/update profile changes and must only be done via the customer backend. Any use of this API key in a Front-End will result in WalletChat having to revoke the API key to prevent any unauthorized access.
Here is an example of a curl POST request which will create a new user in WalletChat, with the given details. Curl is used to here simplify the example, use fetch or your favorite HTTP request library and ensure the Content-Type, Authorization and POST body (data-raw below) are set accordingly.
After the SIWE message has been signed by the user, the integrating site must store the new message being signed, and signature. For example:
const [messageToSign,setMessageToSign] =useState('')const [messageSignature,setMesssageSignature] =useState('')//in event handler for your main site Sign-InsetMessageToSign(message.prepareMessage())setMesssageSignature(signature)
Currently WalletChat only supports SIWE based signatures for Integrated/Single Sign On. If you have a use case you would like us to support, reach out to contact@walletchat.fun
2) Pass Signature Parameters to Widget
Then pass the following parameters to the widget within the :