- Explore the App Secret section to learn more about the App Secret.
- Once you copied App Secret, keep it confidential.
- And import it into your application from environment file.
- React JS or Next JS
- Angular
- Vue
- ReactNative
- Flutter
npm install @iome/react-widget --save
- Developer module
iome.InitDev(), Initializes the developer module to ensure the given developer ID is eligible to use the widget. import { IOMe } from "@iome/react-widget"; let iome = new IOMe("<developerID>"); await iome.InitDev(); console.log(iome.devID);
- Application module
iome.InitApp(), Initializes the application module to ensure the given 'AppSecret' is valid and corresponds to Developer. import { IOMe } from "@iome/react-widget"; let iome = new IOMe("<developerID>", "<appSecret>"); await iome.InitDev(); await iome.InitApp(); console.log(iome.app.appID);
Following are the functions that can be accessed through app module - iome.app.GetAuthToken(type, message, appSecret?), to fetch the authentication token of the app to access/read certain app specific APIs. Learn about the "type" paramater under DAT Components section in this page.
- iome.app.OnboardingCriteria(), to fetch onboarding rules to join the application.
- iome.app.DataPermissions(), to fetch all the data permissions that user are consenting to the application.
- iome.app.Meta(), to fetch meta-data about the application
- iome.app.EncodedAppName, to derive the encoded string of the appname.
- iome.app.IgcPathArray, to derive the IGC path of the application
- User module
User module can only be initialized through Login UI component from iome-widget import { IOMe, Connect } from "@iome/react-widget"; let iome = new IOMe("<developerID>", "<appSecret>"); await iome.InitDev(); await iome.InitApp(); <Connect onSuccess={handleSuccess} iome={iome} />
- Utils
Utils module will be used for various utilities like wallet, encoding, crypto etc functionalities. import { Utils } from "@iome/react-widget"; new Utils.HdWallet() Utils.zk.Generate("credential", version) Utils.enc.mEncode("string") Utils.enc.mDecode("encoded_string")
IOMe Widget Acquiring App Secret Installation Usage Developer module Application module User module Utils module