Sismo Connect Configuration
The SismoConnectConfiguration
is the first object to understand when starting Sismo Connect integration in your application. Its main feature is to reference the appId
you got from the Sismo Factory when you created a new Sismo Connect app. It will then enable you to request proofs from your users and verify them.
Type definitions
The SismoConnectConfiguration
is an object with the following properties:
appId
(required): the Sismo Connect application identifier that you have created on the Sismo Factory.vault.impersonate
(optional): by default set tonull
. The list of Data Sources that you want to impersonate. They will be automatically added to your developer Vault.displayRawResponse
(optional): by default set tofalse
. If set totrue
, the Sismo Data Vault app will display the proof generated in a modal and will not redirect to your application once the proof is generated. It can be useful in development.sismoApiUrl
(optional): API endpoint to fetch group information.vaultAppBaseUrl
(optional): by default set tohttps://vault-beta.sismo.io/
.
As far as the configurations are the same in the client and server packages, we highly recommend having a common config located in a separate file (sismo-connect-config.ts
for example) if you have a mono repo. You can easily import the configuration in your front end and back end from this file.
Integration
Requests are made in the front end using either the sismo-connect-react
package or the sismo-connect-client
package.
Requests are then verified either in a back end using the sismo-connect-server
package or in a smart contract using the sismo-connect-solidity
package.
In your React application, the most basic Sismo Connect Config looks like this:
Impersonating accounts in development
Impersonating accounts allows you to be redirected to a Sismo Data Vault app with fake accounts imported that you defined in the SismoConnectConfig
object. The impersonated Vault only exists in your browser memory. It does not affect your personal Data Vault.
It is useful in development to test your application flow. You are able to generate a proof based on a Sismo Connect request for which you would not be eligible otherwise.
Impersonation should not be used in production.
In your React application, the impersonation Sismo Connect Config looks like this:
Last updated