Login with DIMO
Expedite your build using the Login with DIMO components
Last updated
Expedite your build using the Login with DIMO components
Last updated
Login with DIMO is a React component SDK, providing developers with a set of pre-built, customizable building blocks for applications that integrate with DIMO. These components simplify the process of integrating Accounts API and Transactions SDK in React applications.
Pre-built components: The SDK offers pre-built React components that can be imported easily.
Flexibility with multiple integration modes: The components are designed to be flexible with multiple integration modes, such as embed
, popup
, or redirect
.
Login with DIMO: End users are presented with a email login field, and an OTP will be sent to the email for authentication. A passkey prompt will be triggered after the OTP for either setup or login. This utilizes the Accounts API for developers.
Integration with the Transactions SDK: The React components seamlessly integrate with the Transactions SDK, allowing you to leverage the SDK's features and functionalities such as creating a vehicle and sharing vehicle permissions, etc.
The embed
mode basically embeds an iframe HTML element that surfaces the Login with DIMO interface.
The popup
mode surfaces a React button component that opens up a browser pop-up (new window) containing the Login with DIMO interface.
The redirect
mode surfaces a React button component that redirects the users to the Login with DIMO interface.
Login with DIMO allow developers to surface an interface for the end users to authenticate by integrating with the Accounts API. This functionality sets up the smart contract wallet for the end user, giving full root access to the user (and only the user), enabling logins across all DIMO platforms with the use of a passkey.
DIMO Check-in
Learn more about how passkey is more secure and the future for Internet security in this Google blog: https://blog.google/inside-google/googlers/ask-a-techspert/how-passkeys-work/
This is an optional functionality that you can enable on the Component SDK. When this is enabled, logged in users are prompted with a share permission(s) page to share their selected vehicles with your application.
Download the React Component SDK via NPM
In your React project, import { LoginWithDimo }
In your React app, drop in the component with the following input configurations:
Parameter Name | Type | Details |
---|---|---|
| String | One of the three available modes: |
| Callback | Callback function called when the |
| Callback | Callback function called when error occurs. |
| String | A valid client ID registered with your Developer License. |
| String | A valid redirect URI registered with your Developer License. |
| String | Optional API key of your Developer License. This is currently not used and reserved for future applications. |
| String | Optional template ID of the SACD permissions template on IPFS. If |
| [String] | Optional array of vehicle |
| String | Environment where your app is registered to. Defaults to |