adapt new oauth api