Application User Login Guide
Introduction
eDRV is a server-to-server API and does not authenticate application-side users. In order to interact with any EV charging related resources (e.g. starting a charging session) on behalf of a user, your application must bind your application's UserId with an eDRV side UserId.

Application User Login with Two Way UserId Binding
eDRV leaves authentication logic to the Developer and has no biases or opinions around Auth. Some popular auth methods/services are:
- Auth0
- Firebase
- Cognito
- Supabase
- Custom / Hybrid
Requirements
The only requirement from eDRV is to have Two-way bindings between user resources from the Developer application and users on the eDRV platform. There needs to be an association of ids as eDRV APIs require userId for many endpoints like (sessions, payments, user rates, location access control, etc)
Example
eDRV user._id = 5fca57b3fbfcc // this is a user resource on eDRV which is created by the developer via using POST v1.1/users
Application user ID = 44e93f070b // this id is related to the developer's own application unique key to identify the user record in the developer's Application
Thus the link can be done as shown below:
Application.user.edrv_userId = 5fca57b3fbfcc
eDRV.user.meta_data.app_UserId = 44e93f070b
No Auth Logic From eDRV
eDRV does not handle any auth logic as this will be completely handled by the Developer with the only requirement that there should be a two-way binding between userId from eDRV and the Developer Platform.
Associating Application Users with eDRV Users
Whenever there is a new user registration request, the Developer can take the following steps:
- Call the
POST v1.1/users
endpoint on eDRV to request a new user resource. - Create a user record in the Developer application; then save the
user._id
from the above step on this newly created user. - Call
PATCH v1.1/user/:id
to save resource ID as meta_data in point 2 on eDRV.
Migration Guide: For existing Users in the Legacy eDRV Driver App
We recommend that as soon as your application is live, users from the existing driver app are prompted to register and download the new app.
It is important to capture the existing user's (eDRV) userId for establishing a two-way-binding on UserIds.
eDRV can provide necessary changes to the legacy driver app to display links, images, forms, QR codes etc. to embed and exchange the driver's userId with the new application.
Updated 10 months ago