updatePhoneSession method
Create Phone Session (confirmation)
Use this endpoint to complete creating a session with SMS. Use the userId from the createPhoneSession endpoint and the secret received via SMS to successfully update and confirm the phone session.
Implementation
Future<models.Session> updatePhoneSession(
{required String userId, required String secret}) async {
const String path = '/account/sessions/phone';
final Map<String, dynamic> params = {
'userId': userId,
'secret': secret,
};
final Map<String, String> headers = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.put,
path: path, params: params, headers: headers);
return models.Session.fromMap(res.data);
}