loginCode method
Implementation
Future<bool> loginCode(String email) async {
try {
_dio.options.headers['content-Type'] = 'application/json';
var response = await _dio
.post('$baseUrl/frontegg/identity/resources/auth/v1/passwordless/code/prelogin', data: {"email": email});
cookies = response.headers.map['set-cookie'];
return true;
} catch (e) {
if (e is DioError && e.response != null) {
throw e.response!.data['errors'][0];
}
throw tr('invalid_authentication');
}
}