Moved additional constructor for AuthProvider into object apply method.