Code Duplication    Length = 11-11 lines in 2 locations

projects/packages/connection/legacy/class-jetpack-xmlrpc-server.php 1 location

@@ 382-392 (lines=11) @@
379
		$auto_enable_sso = ( ! $this->connection->has_connected_owner() || Jetpack::is_module_active( 'sso' ) );
380
381
		/** This filter is documented in class.jetpack-cli.php */
382
		if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) {
383
			$redirect_uri = add_query_arg(
384
				array(
385
					'action'      => 'jetpack-sso',
386
					'redirect_to' => rawurlencode( admin_url() ),
387
				),
388
				wp_login_url() // TODO: come back to Jetpack dashboard?
389
			);
390
		} else {
391
			$redirect_uri = admin_url();
392
		}
393
394
		// Generate secrets.
395
		$roles   = new Roles();

projects/plugins/jetpack/_inc/class.jetpack-provision.php 1 location

@@ 76-86 (lines=11) @@
73
		$auto_enable_sso = ( ! Jetpack::connection()->has_connected_owner() || Jetpack::is_module_active( 'sso' ) );
74
75
		/** This filter is documented in class.jetpack-cli.php */
76
		if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) {
77
			$redirect_uri = add_query_arg(
78
				array(
79
					'action'      => 'jetpack-sso',
80
					'redirect_to' => rawurlencode( admin_url() ),
81
				),
82
				wp_login_url() // TODO: come back to Jetpack dashboard?
83
			);
84
		} else {
85
			$redirect_uri = admin_url();
86
		}
87
88
		$request_body = array(
89
			'jp_version'   => JETPACK__VERSION,