original_string: public function auth(Request $request, $action)
      {
          $provider = strtolower($request->attributes->get('provider'));
  
          if (! $this->providerExists($provider)) {
              return $this->createNotFoundResponse();
          }
  
          $service = $this->getServiceByProvider($provider);
  
          $redirectUri = $service->getAuthorizationUri(['state' => $action]);
  
          $response = new Response();
          $response->setStatusCode(301);
          $response->headers->set('Location', (string) $redirectUri);
          return $response;
      }
code: public function auth(Request $request, $action)
      {
          $provider = strtolower($request->attributes->get('provider'));
  
          if (! $this->providerExists($provider)) {
              return $this->createNotFoundResponse();
          }
  
          $service = $this->getServiceByProvider($provider);
  
          $redirectUri = $service->getAuthorizationUri(['state' => $action]);
  
          $response = new Response();
          $response->setStatusCode(301);
          $response->headers->set('Location', (string) $redirectUri);
          return $response;
      }
code_tokens: public function auth ( Request $ request , $ action ) { $ provider = strtolower ( $ request -> attributes -> get ( 'provider' ) ) ; if ( ! $ this -> providerExists ( $ provider ) ) { return $ this -> createNotFoundResponse ( ) ; } $ service = $ this -> getServiceByProvider ( $ provider ) ; $ redirectUri = $ service -> getAuthorizationUri ( [ 'state' => $ action ] ) ; $ response = new Response ( ) ; $ response -> setStatusCode ( 301 ) ; $ response -> headers -> set ( 'Location' , ( string ) $ redirectUri ) ; return $ response ; }
docstring: Authenticate via a separate OAuth provider
  
  @param  Request $request
  @param  int     $action  Constant representing either Login or Link account
  @return Response
docstring_tokens: Authenticate via a separate OAuth provider