Ionic SDK
Usage
Reclaim Protocol's Capacitor SDK
To use Reclaim InApp Sdk in your project, follow these steps:
- Import the
@reclaimprotocol/inapp-capacitor-sdk
package in your project file.
- Initialize the
ReclaimVerification
class to create an instance.
- Start the verification flow by providing the app id, secret and provider id.
The returned result is a [ReclaimVerification.Response] object. This object contains a response that has proofs, exception, and the sessionId if the verification is successful.
Exception Handling
If the verification ends with an exception, the exception is thrown as a [ReclaimVerification.ReclaimVerificationException] object.
Following is an example of how to handle the exception using [error.type]:
This error also contains sessionId
, reason
, and innerError
that can be used to get more details about the occurred error.
Migration
Example
- See the Reclaim Example - Capacitor for a complete example of how to use the SDK in a Capacitor application.
Advanced Usage
For more usage options see Advance Options guide