This seems very hacky... can't you just get the authentication provider and set the username on it?