updateVerification method

Future<Token> updateVerification({
  1. required String userId,
  2. required String secret,
})

Create email verification (confirmation)

Use this endpoint to complete the user email verification process. Use both the userId and secret parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.

Implementation

Future<models.Token> updateVerification(
    {required String userId, required String secret}) async {
  final String apiPath = '/account/verification';

  final Map<String, dynamic> apiParams = {
    'userId': userId,
    'secret': secret,
  };

  final Map<String, String> apiHeaders = {
    'content-type': 'application/json',
  };

  final res = await client.call(HttpMethod.put,
      path: apiPath, params: apiParams, headers: apiHeaders);

  return models.Token.fromMap(res.data);
}