logout method
KO: 로그아웃
EN: Logout
Implementation
Future<UserIdResponse> logout() async {
SdkLog.d('[UserApi.logout] started');
try {
final response = await _client.post(Constants.v1LogoutPath);
final result = UserIdResponse.fromJson(response.data);
SdkLog.i('[UserApi.logout] completed | userId=${result.id}');
return result;
} finally {
await TokenManagerProvider.instance.manager.clear();
SdkLog.i('[UserApi.logout] local_state_cleared');
}
}