Releases: DIMO-Network/login-with-dimo
Releases · DIMO-Network/login-with-dimo
Auth State with Persistence
Exposes a DimoAuthState, and DimoAuthProvider
This gives access to an isAuthenticated property, which user can use to render components accordingly
Mobile Messaging Fix
Merge pull request #20 from DIMO-Network/development Fix Mobile Credentials Load on Popup by adding a timeout
Optional API Key
working demo: sample.drivedimo.com
0.0.4 Share Vehicles with DIMO Component
Introduces SDK Config, to allow developers to only have to include credentials once
Introduces a Share Vehicles with DIMO Component
https://www.loom.com/share/375731a14e8b48e8a01bfae9d26d2ce3
https://www.loom.com/share/b0d8047dce4a4df3b8d2ef6a7ab7f4ef
0.0.3 README Docs
Merge pull request #13 from DIMO-Network/development Development
0.0.2 (Increased React Support)
Lowers React Version requirement to support all versions over 18
NPM Initial Version Published
initial SDK version for internal use
Includes
- Early designs
- Sign up/sign in with JWT retrieval
- Configurable vehicles
- Permission sharing
TBD
- JWT persistence in storage, and state setting
- Responsive UI, consistent sizing
Instructions
Installation
- Add the .tgz file to the root of your project
- npm i
dimo-login-button-sdk-1.0.0.tgz
Import
- import { LoginWithDimo } from 'dimo-login-button-sdk';
Usage
<LoginWithDimo
mode="redirect" //can be set to "redirect", "popup", or "embed"
onSuccess={(authData) => console.log("Success:", authData)} //auth data is the JWT token, this onsuccess won't trigger if redirect
onError={(error) => console.error("Error:", error)}
clientId={"some_0x_client_id"}
redirectUri={"some_redirect_uri"}
environment={"development"} //OPTIONAL, will default to prod, ensure correct client ID/redirect URI for dev licence
apiKey={"d794016835909c49dd94d65ea06c12b428761550f187ecc765732cd6e823286b"} //OPTIONAL
permissionTemplateId={"1"} //OPTIONAL, if not set, will not prompt users to share vehicles
vehicles={["585","586"]} //OPTIONAL, if not set, will fetch all vehicles
/>