reverseLogin method

Future<Result<Map<String, dynamic>>> reverseLogin({
  1. required String token,
  2. required String phone,
  3. required String email,
  4. required String shopifyCustomerId,
})

Perform reverse login with Kwikpass token

This method should be called after SDK initialization to authenticate the user with their existing credentials.

Parameters:

  • token: Authentication token from the host app
  • phone: User's phone number
  • email: User's email address
  • shopifyCustomerId: Shopify customer ID

Returns a Result containing the login response data or failure message

Implementation

Future<Result<Map<String, dynamic>>> reverseLogin({
  required String token,
  required String phone,
  required String email,
  required String shopifyCustomerId,
}) async {
  try {
    return await ApiService.kwikpassLoginWithToken(
      token: token,
      phone: phone,
      email: email,
      shopifyCustomerId: shopifyCustomerId,
    );
  } catch (err) {
    rethrow;
  }
}