A council has passed a motion opposing the government's plans for compulsory digital ID calling it "a clear danger for our residents".