hunk.code_window:                 .then(Mono.zip(
                           repository.findByEmail(user.getUsername()),
                           userDataService.getForUserEmail(user.getUsername())
                   ))
                   .flatMap(tuple -> analyticsService.trackNewUser(tuple.getT1(), tuple.getT2()));
       }
       /**
        * This function creates a new user in the system. Primarily used by new users signing up for the first time on the
  
hunk.labels: keep keep keep keep replace keep keep keep keep
hunk.after_edit:                 .flatMap(tuple -> analyticsService.identifyUser(tuple.getT1(), tuple.getT2()));
  
hunk.file_path: app/server/appsmith-server/src/main/java/com/appsmith/server/services/UserServiceImpl.java
hunk.type: replace
file: package com.appsmith.server.controllers;
  
  import com.appsmith.server.constants.Url;
  import com.appsmith.external.models.Datasource;
  import com.appsmith.server.dtos.ResponseDTO;
  import com.appsmith.server.solutions.AuthenticationService;
  import lombok.extern.slf4j.Slf4j;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.http.HttpStatus;
  import org.springframework.web.bind.annotation.PathVariable;
  import org.springframework.web.bind.annotation.PostMapping;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestParam;
  import org.springframework.web.bind.annotation.RestController;
  import org.springframework.web.server.ServerWebExchange;
  import reactor.core.publisher.Mono;
  
  @Slf4j
  @RestController
  @RequestMapping(Url.SAAS_URL)
  public class SaasController {
  
      private final AuthenticationService authenticationService;
  
      @Autowired
      public SaasController(AuthenticationService authenticationService) {
          this.authenticationService = authenticationService;
      }
  
      @PostMapping("/{datasourceId}/pages/{pageId}/oauth")
      public Mono<ResponseDTO<String>> getAppsmithToken(@PathVariable String datasourceId, @PathVariable String pageId, ServerWebExchange serverWebExchange) {
  
          log.debug("Going to retrieve token request URL for datasource with id: {} and page id: {}", datasourceId, pageId);
          return authenticationService.getAppsmithToken(datasourceId, pageId, serverWebExchange.getRequest())
                  .map(token -> new ResponseDTO<>(HttpStatus.OK.value(), token, null));
      }
  
      @PostMapping("/{datasourceId}/token")
      public Mono<ResponseDTO<Datasource>> getAccessToken(@PathVariable String datasourceId, @RequestParam String appsmithToken, ServerWebExchange serverWebExchange) {
  
          log.debug("Received callback for an OAuth2 authorization request");
          return authenticationService.getAccessTokenFromCloud(datasourceId, appsmithToken)
                  .map(datasource -> new ResponseDTO<>(HttpStatus.OK.value(), datasource, null));
      }
  
  }
  