authenticateWithFirebase2Uid method

Future<StrapiResponse> authenticateWithFirebase2Uid({
  1. required String firebaseUid,
})

Implementation

Future<StrapiResponse> authenticateWithFirebase2Uid({
  required String firebaseUid,
}) async {
  if (firebaseUid.isEmpty) {
    throw StrapiException(
      msg: "empty string cannot be passed as uid",
    );
  }

  final response = await request("/auth/firebase2/callback", params: {
    "access_token": "$firebaseUid",
  });
  if (!response.failed) {
    strapiToken = response.body.first["jwt"];
  }
  return response;
}