> ## Documentation Index
> Fetch the complete documentation index at: https://auth0.generaltranslation.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure Flexible Connection Switching

> Learn how you can implement flexible connection switching with Universal Login

export const AuthCodeGroup = ({children, dropdown}) => {
  const [processedChildren, setProcessedChildren] = useState(children);
  useEffect(() => {
    let unsubscribe = null;
    function init() {
      unsubscribe = window.autorun(() => {
        const processChildren = node => {
          if (typeof node === "string") {
            let processedNode = node;
            for (const [key, value] of window.rootStore.variableStore.values.entries()) {
              processedNode = processedNode.replace(new RegExp(key, "g"), value);
            }
            return processedNode;
          } else if (Array.isArray(node)) {
            return node.map(processChildren);
          } else if (node && node.props && node.props.children) {
            return {
              ...node,
              props: {
                ...node.props,
                children: processChildren(node.props.children)
              }
            };
          }
          return node;
        };
        setProcessedChildren(processChildren(children));
      });
    }
    if (window.rootStore) {
      init();
    } else {
      window.addEventListener("adu:storeReady", init);
    }
    return () => {
      window.removeEventListener("adu:storeReady", init);
      unsubscribe?.();
    };
  }, [children]);
  return <CodeGroup dropdown={dropdown}>{processedChildren}</CodeGroup>;
};

export const AuthCodeBlock = ({filename, icon, language, highlight, children}) => {
  const [processedChildren, setProcessedChildren] = useState(children);
  useEffect(() => {
    let unsubscribe = null;
    function init() {
      unsubscribe = window.autorun(() => {
        let processedChildren = children;
        for (const [key, value] of window.rootStore.variableStore.values.entries()) {
          processedChildren = processedChildren.replace(new RegExp(key, "g"), value);
        }
        setProcessedChildren(processedChildren);
      });
    }
    if (window.rootStore) {
      init();
    } else {
      window.addEventListener("adu:storeReady", init);
    }
    return () => {
      window.removeEventListener("adu:storeReady", init);
      unsubscribe?.();
    };
  }, [children]);
  return <CodeBlock filename={filename} icon={icon} language={language} lines highlight={highlight}>
      {processedChildren}
    </CodeBlock>;
};

Flexible connection switching is an optional feature that allows users to choose their method of authentication when logging in to an application. When implemented, your application's login screen presents users with the option to authenticate with either traditional database credentials or a <Tooltip data-tooltip-id="react-containers-DefinitionTooltip-0" href="/docs/ja-JP/ja-jp/glossary?term=passwordless" tip="パスワードレス: 最初の要素としてパスワードに依存しない認証の形式。" cta="用語集の表示">passwordless</Tooltip> connection. Users who select a [passwordless connection](/docs/ja-JP/ja-jp/authenticate/passwordless) receive a one-time password (OTP) through email or SMS that they can use to log in to your application.

Flexible connection switching uses [custom Universal Login prompts](/docs/ja-JP/ja-jp/customize/login-pages/universal-login/customize-signup-and-login-prompts) to provide users with a more autonomous authentication experience.

<div id="before-you-begin">
  ## Before you begin
</div>

Before you can implement flexible connection switching, ensure the following requirements are met:

* Use [Universal Login](/docs/ja-JP/ja-jp/authenticate/login/auth0-universal-login).

  * This feature is not available for custom login pages.
* Configure a [custom domain](/docs/ja-JP/ja-jp/customize/custom-domains).
* Enable the following for your application:

  * [Identifier First authentication](/docs/ja-JP/ja-jp/authenticate/login/auth0-universal-login/identifier-first)
  * [Database connection](/docs/ja-JP/ja-jp/authenticate/database-connections)
  * [Email or SMS passwordless authentication](/docs/ja-JP/ja-jp/authenticate/login/auth0-universal-login/passwordless-login/email-or-sms)

<div id="implement-flexible-connection-switching">
  ## Implement flexible connection switching
</div>

To implement this feature, use the [Auth0 Management API](/docs/ja-JP/api/management/v2) to configure custom signup and login prompt partials. Partials refer to custom code inserted into an entry point within a prompt screen, such as the login screen. To learn more, review [Customize Signup and Login Prompts](/docs/ja-JP/ja-jp/customize/login-pages/universal-login/customize-signup-and-login-prompts).

To implement flexible connection switching, you will configure custom prompt partials with the following parameters:

<table class="table">
  <thead>
    <tr>
      <th><strong>Parameter</strong></th>
      <th><strong>Description</strong></th>
      <th><strong>Example</strong></th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td><code>state</code></td>
      <td>Renders the current page's state value, which is opaque and used for security purposes.<br /><br />To learn more about current screen information, review <a href="/docs/ja-JP/customize/login-pages/universal-login/customize-templates#current-screen-information">Customize Univeral Login Page Templates</a>.</td>
      <td><code>\<input type='hidden' name='state' value='\{\{state}}'></code></td>
    </tr>

    <tr>
      <td><code>connection</code></td>
      <td>Name and type of the connection.<br /><br />For passwordless connections, value is either <code>email</code> or <code>sms</code>.</td>
      <td><code>\<input type='hidden' name='connection' value='email'></code></td>
    </tr>
  </tbody>
</table>

<Warning>
  In the code samples below, ensure you replace the placeholders with the appropriate values:

  * Replace `{yourDomain}` with `yourdomain.auth0.com`.
  * Replace `{mgmtApiToken}` with your access token.
</Warning>

<div id="configure-signup-prompt">
  ### Configure signup prompt
</div>

You can configure the `signup-password` prompt using the [Set partials for a prompt](/docs/ja-JP/api/management/v2/prompts/put-partials) endpoint:

<AuthCodeGroup>
  ````bash cURL theme={null}
  curl --request PUT \
  --url 'https://{yourDomain}/api/v2/prompts/signup-password/partials' \
  --header 'authorization: Bearer {mgmtApiToken}' \
  --header 'content-type: application/json' \
  --data '{"signup-password":{"form-footer-start":"<form method=\"post\" data-form-secondary=\"true\"><input type=\"hidden\" name=\"state\" value=\"{{state}}\"> <input type=\"hidden\" name=\"connection\" value=\"email\"> <button type=\"submit\" id=\"switchConnectionButton\" style=\"background: #635dff; width: 100%; padding: 12px 16px; border: none; color: white;\" data-action-button-secondary=\"true\"> <span>Send a secure code by email</span> </button></form>"}}'
  ``` lines
  ```csharp C#
  var client = new RestClient("https://{yourDomain}/api/v2/prompts/signup-password/partials");
  var request = new RestRequest(Method.PUT);
  request.AddHeader("authorization", "Bearer {mgmtApiToken}");
  request.AddHeader("content-type", "application/json");
  request.AddParameter("application/json", "{"signup-password":{"form-footer-start":"<form method=\"post\" data-form-secondary=\"true\"><input type=\"hidden\" name=\"state\" value=\"{{state}}\"> <input type=\"hidden\" name=\"connection\" value=\"email\"> <button type=\"submit\" id=\"switchConnectionButton\" style=\"background: #635dff; width: 100%; padding: 12px 16px; border: none; color: white;\" data-action-button-secondary=\"true\"> <span>Send a secure code by email</span> </button></form>"}}", ParameterType.RequestBody);
  IRestResponse response = client.Execute(request);
  ````

  ````go Go theme={null}
  package main
  import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
  )
  func main() {
  url := "https://{yourDomain}/api/v2/prompts/signup-password/partials"
  payload := strings.NewReader("{"signup-password":{"form-footer-start":"<form method=\"post\" data-form-secondary=\"true\"><input type=\"hidden\" name=\"state\" value=\"{{state}}\"> <input type=\"hidden\" name=\"connection\" value=\"email\"> <button type=\"submit\" id=\"switchConnectionButton\" style=\"background: #635dff; width: 100%; padding: 12px 16px; border: none; color: white;\" data-action-button-secondary=\"true\"> <span>Send a secure code by email</span> </button></form>"}}")
  req, _ := http.NewRequest("PUT", url, payload)
  req.Header.Add("authorization", "Bearer {mgmtApiToken}")
  req.Header.Add("content-type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)
  fmt.Println(res)
  fmt.Println(string(body))
  }
  ``` lines
  ```java Java
  HttpResponse response = Unirest.put("https://{yourDomain}/api/v2/prompts/signup-password/partials")
  .header("authorization", "Bearer {mgmtApiToken}")
  .header("content-type", "application/json")
  .body("{"signup-password":{"form-footer-start":"<form method=\"post\" data-form-secondary=\"true\"><input type=\"hidden\" name=\"state\" value=\"{{state}}\"> <input type=\"hidden\" name=\"connection\" value=\"email\"> <button type=\"submit\" id=\"switchConnectionButton\" style=\"background: #635dff; width: 100%; padding: 12px 16px; border: none; color: white;\" data-action-button-secondary=\"true\"> <span>Send a secure code by email</span> </button></form>"}}")
  .asString();
  ````

  ````javascript Node.JS theme={null}
  var axios = require("axios").default;
  var options = {
  method: 'PUT',
  url: 'https://{yourDomain}/api/v2/prompts/signup-password/partials',
  headers: {authorization: 'Bearer {mgmtApiToken}', 'content-type': 'application/json'},
  data: {
  'signup-password': {
  'form-footer-start': '   Send a secure code by email '
  }
  }
  };
  axios.request(options).then(function (response) {
  console.log(response.data);
  }).catch(function (error) {
  console.error(error);
  });
  ``` lines
  ```objc Obj-C
  #import 
  NSDictionary \*headers = @{ @"authorization": @"Bearer {mgmtApiToken}",
  @"content-type": @"application/json" };
  NSDictionary \*parameters = @{ @"signup-password": @{ @"form-footer-start": @"<form method=\"post\" data-form-secondary=\"true\"><input type=\"hidden\" name=\"state\" value=\"{{state}}\"> <input type=\"hidden\" name=\"connection\" value=\"email\"> <button type=\"submit\" id=\"switchConnectionButton\" style=\"background: #635dff; width: 100%; padding: 12px 16px; border: none; color: white;\" data-action-button-secondary=\"true\"> <span>Send a secure code by email</span> </button></form>" } };
  NSData \*postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
  NSMutableURLRequest \*request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://{yourDomain}/api/v2/prompts/signup-password/partials"]
  cachePolicy:NSURLRequestUseProtocolCachePolicy
  timeoutInterval:10.0];
  [request setHTTPMethod:@"PUT"];
  [request setAllHTTPHeaderFields:headers];
  [request setHTTPBody:postData];
  NSURLSession \*session = [NSURLSession sharedSession];
  NSURLSessionDataTask \*dataTask = [session dataTaskWithRequest:request
  completionHandler:^(NSData \*data, NSURLResponse \*response, NSError \*error) {
  if (error) {
  NSLog(@"%@", error);
  } else {
  NSHTTPURLResponse \*httpResponse = (NSHTTPURLResponse \*) response;
  NSLog(@"%@", httpResponse);
  }
  }];
  [dataTask resume];
  ````

  ````php PHP theme={null}
  $curl = curl_init();
  curl_setopt_array($curl, [
  CURLOPT_URL => "https://{yourDomain}/api/v2/prompts/signup-password/partials",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{"signup-password":{"form-footer-start":"<form method=\"post\" data-form-secondary=\"true\"><input type=\"hidden\" name=\"state\" value=\"{{state}}\"> <input type=\"hidden\" name=\"connection\" value=\"email\"> <button type=\"submit\" id=\"switchConnectionButton\" style=\"background: #635dff; width: 100%; padding: 12px 16px; border: none; color: white;\" data-action-button-secondary=\"true\"> <span>Send a secure code by email</span> </button></form>"}}",
  CURLOPT_HTTPHEADER => [
  "authorization: Bearer {mgmtApiToken}",
  "content-type: application/json"
  ],
  ]);
  $response = curl_exec($curl);
  $err = curl_error($curl);
  curl_close($curl);
  if ($err) {
  echo "cURL Error #:" . $err;
  } else {
  echo $response;
  }
  ``` lines
  ```python Python
  import http.client
  conn = http.client.HTTPSConnection("")
  payload = "{"signup-password":{"form-footer-start":"<form method=\"post\" data-form-secondary=\"true\"><input type=\"hidden\" name=\"state\" value=\"{{state}}\"> <input type=\"hidden\" name=\"connection\" value=\"email\"> <button type=\"submit\" id=\"switchConnectionButton\" style=\"background: #635dff; width: 100%; padding: 12px 16px; border: none; color: white;\" data-action-button-secondary=\"true\"> <span>Send a secure code by email</span> </button></form>"}}"
  headers = {
  'authorization': "Bearer {mgmtApiToken}",
  'content-type': "application/json"
  }
  conn.request("PUT", "/{yourDomain}/api/v2/prompts/signup-password/partials", payload, headers)
  res = conn.getresponse()
  data = res.read()
  print(data.decode("utf-8"))
  ````

  ````ruby Ruby theme={null}
  require 'uri'
  require 'net/http'
  require 'openssl'
  url = URI("https://{yourDomain}/api/v2/prompts/signup-password/partials")
  http = Net::HTTP.new(url.host, url.port)
  http.use_ssl = true
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE
  request = Net::HTTP::Put.new(url)
  request["authorization"] = 'Bearer {mgmtApiToken}'
  request["content-type"] = 'application/json'
  request.body = "{"signup-password":{"form-footer-start":"<form method=\"post\" data-form-secondary=\"true\"><input type=\"hidden\" name=\"state\" value=\"{{state}}\"> <input type=\"hidden\" name=\"connection\" value=\"email\"> <button type=\"submit\" id=\"switchConnectionButton\" style=\"background: #635dff; width: 100%; padding: 12px 16px; border: none; color: white;\" data-action-button-secondary=\"true\"> <span>Send a secure code by email</span> </button></form>"}}"
  response = http.request(request)
  puts response.read_body
  ``` lines
  ```swift Swift
  import Foundation
  let headers = [
  "authorization": "Bearer {mgmtApiToken}",
  "content-type": "application/json"
  ]
  let parameters = ["signup-password": ["form-footer-start": "<form method=\"post\" data-form-secondary=\"true\"><input type=\"hidden\" name=\"state\" value=\"{{state}}\"> <input type=\"hidden\" name=\"connection\" value=\"email\"> <button type=\"submit\" id=\"switchConnectionButton\" style=\"background: #635dff; width: 100%; padding: 12px 16px; border: none; color: white;\" data-action-button-secondary=\"true\"> <span>Send a secure code by email</span> </button></form>"]] as [String : Any]
  let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
  let request = NSMutableURLRequest(url: NSURL(string: "https://{yourDomain}/api/v2/prompts/signup-password/partials")! as URL,
  cachePolicy: .useProtocolCachePolicy,
  timeoutInterval: 10.0)
  request.httpMethod = "PUT"
  request.allHTTPHeaderFields = headers
  request.httpBody = postData as Data
  let session = URLSession.shared
  let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
  print(error)
  } else {
  let httpResponse = response as? HTTPURLResponse
  print(httpResponse)
  }
  })
  dataTask.resume()
  ````
</AuthCodeGroup>

As a result, a **Send a secure code by email button** is added to the `signup-password` screen. When a user selects this button, it submits a form body containing the login state parameter and the name of the desired connection.

<div id="configure-login-prompts">
  ### Configure login prompts
</div>

For best results, configuring the login prompt for both password and passwordless connections is recommended.

You can configure the `login-password` prompt using the [Set partials for a prompt](/docs/ja-JP/api/management/v2/prompts/put-partials) endpoint:

<AuthCodeGroup>
  ````bash cURL theme={null}
  curl --request PUT \
  --url 'https://{yourDomain}/api/v2/prompts/login-password/partials' \
  --header 'authorization: Bearer {mgmtApiToken}' \
  --header 'content-type: application/json' \
  --data '{"login-password":{"form-footer-start":"<form method=\"post\" data-form-secondary=\"true\"><input type=\"hidden\" name=\"state\" value=\"{{state}}\"> <input type=\"hidden\" name=\"connection\" value=\"email\"> <button type=\"submit\" id=\"switchConnectionButton\" style=\"background: #635dff; width: 100%; padding: 12px 16px; border: none; color: white;\" data-action-button-secondary=\"true\"> <span>Send a secure code by email</span> </button></form>"}}'
  ``` lines
  ```csharp C#
  var client = new RestClient("https://{yourDomain}/api/v2/prompts/login-password/partials");
  var request = new RestRequest(Method.PUT);
  request.AddHeader("authorization", "Bearer {mgmtApiToken}");
  request.AddHeader("content-type", "application/json");
  request.AddParameter("application/json", "{"login-password":{"form-footer-start":"<form method=\"post\" data-form-secondary=\"true\"><input type=\"hidden\" name=\"state\" value=\"{{state}}\"> <input type=\"hidden\" name=\"connection\" value=\"email\"> <button type=\"submit\" id=\"switchConnectionButton\" style=\"background: #635dff; width: 100%; padding: 12px 16px; border: none; color: white;\" data-action-button-secondary=\"true\"> <span>Send a secure code by email</span> </button></form>"}}", ParameterType.RequestBody);
  IRestResponse response = client.Execute(request);
  ````

  ````go Go theme={null}
  package main
  import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
  )
  func main() {
  url := "https://{yourDomain}/api/v2/prompts/login-password/partials"
  payload := strings.NewReader("{"login-password":{"form-footer-start":"<form method=\"post\" data-form-secondary=\"true\"><input type=\"hidden\" name=\"state\" value=\"{{state}}\"> <input type=\"hidden\" name=\"connection\" value=\"email\"> <button type=\"submit\" id=\"switchConnectionButton\" style=\"background: #635dff; width: 100%; padding: 12px 16px; border: none; color: white;\" data-action-button-secondary=\"true\"> <span>Send a secure code by email</span> </button></form>"}}")
  req, _ := http.NewRequest("PUT", url, payload)
  req.Header.Add("authorization", "Bearer {mgmtApiToken}")
  req.Header.Add("content-type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)
  fmt.Println(res)
  fmt.Println(string(body))
  }
  ``` lines
  ```java Java
  HttpResponse response = Unirest.put("https://{yourDomain}/api/v2/prompts/login-password/partials")
  .header("authorization", "Bearer {mgmtApiToken}")
  .header("content-type", "application/json")
  .body("{"login-password":{"form-footer-start":"<form method=\"post\" data-form-secondary=\"true\"><input type=\"hidden\" name=\"state\" value=\"{{state}}\"> <input type=\"hidden\" name=\"connection\" value=\"email\"> <button type=\"submit\" id=\"switchConnectionButton\" style=\"background: #635dff; width: 100%; padding: 12px 16px; border: none; color: white;\" data-action-button-secondary=\"true\"> <span>Send a secure code by email</span> </button></form>"}}")
  .asString();
  ````

  ````javascript Node.JS theme={null}
  var axios = require("axios").default;
  var options = {
  method: 'PUT',
  url: 'https://{yourDomain}/api/v2/prompts/login-password/partials',
  headers: {authorization: 'Bearer {mgmtApiToken}', 'content-type': 'application/json'},
  data: {
  'login-password': {
  'form-footer-start': '   Send a secure code by email '
  }
  }
  };
  axios.request(options).then(function (response) {
  console.log(response.data);
  }).catch(function (error) {
  console.error(error);
  });
  ``` lines
  ```objc Obj-C
  #import 
  NSDictionary \*headers = @{ @"authorization": @"Bearer {mgmtApiToken}",
  @"content-type": @"application/json" };
  NSDictionary \*parameters = @{ @"login-password": @{ @"form-footer-start": @"<form method=\"post\" data-form-secondary=\"true\"><input type=\"hidden\" name=\"state\" value=\"{{state}}\"> <input type=\"hidden\" name=\"connection\" value=\"email\"> <button type=\"submit\" id=\"switchConnectionButton\" style=\"background: #635dff; width: 100%; padding: 12px 16px; border: none; color: white;\" data-action-button-secondary=\"true\"> <span>Send a secure code by email</span> </button></form>" } };
  NSData \*postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
  NSMutableURLRequest \*request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://{yourDomain}/api/v2/prompts/login-password/partials"]
  cachePolicy:NSURLRequestUseProtocolCachePolicy
  timeoutInterval:10.0];
  [request setHTTPMethod:@"PUT"];
  [request setAllHTTPHeaderFields:headers];
  [request setHTTPBody:postData];
  NSURLSession \*session = [NSURLSession sharedSession];
  NSURLSessionDataTask \*dataTask = [session dataTaskWithRequest:request
  completionHandler:^(NSData \*data, NSURLResponse \*response, NSError \*error) {
  if (error) {
  NSLog(@"%@", error);
  } else {
  NSHTTPURLResponse \*httpResponse = (NSHTTPURLResponse \*) response;
  NSLog(@"%@", httpResponse);
  }
  }];
  [dataTask resume];
  ````

  ````php PHP theme={null}
  $curl = curl_init();
  curl_setopt_array($curl, [
  CURLOPT_URL => "https://{yourDomain}/api/v2/prompts/login-password/partials",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{"login-password":{"form-footer-start":"<form method=\"post\" data-form-secondary=\"true\"><input type=\"hidden\" name=\"state\" value=\"{{state}}\"> <input type=\"hidden\" name=\"connection\" value=\"email\"> <button type=\"submit\" id=\"switchConnectionButton\" style=\"background: #635dff; width: 100%; padding: 12px 16px; border: none; color: white;\" data-action-button-secondary=\"true\"> <span>Send a secure code by email</span> </button></form>"}}",
  CURLOPT_HTTPHEADER => [
  "authorization: Bearer {mgmtApiToken}",
  "content-type: application/json"
  ],
  ]);
  $response = curl_exec($curl);
  $err = curl_error($curl);
  curl_close($curl);
  if ($err) {
  echo "cURL Error #:" . $err;
  } else {
  echo $response;
  }
  ``` lines
  ```python Python
  import http.client
  conn = http.client.HTTPSConnection("")
  payload = "{"login-password":{"form-footer-start":"<form method=\"post\" data-form-secondary=\"true\"><input type=\"hidden\" name=\"state\" value=\"{{state}}\"> <input type=\"hidden\" name=\"connection\" value=\"email\"> <button type=\"submit\" id=\"switchConnectionButton\" style=\"background: #635dff; width: 100%; padding: 12px 16px; border: none; color: white;\" data-action-button-secondary=\"true\"> <span>Send a secure code by email</span> </button></form>"}}"
  headers = {
  'authorization': "Bearer {mgmtApiToken}",
  'content-type': "application/json"
  }
  conn.request("PUT", "/{yourDomain}/api/v2/prompts/login-password/partials", payload, headers)
  res = conn.getresponse()
  data = res.read()
  print(data.decode("utf-8"))
  ````

  ````ruby Ruby theme={null}
  require 'uri'
  require 'net/http'
  require 'openssl'
  url = URI("https://{yourDomain}/api/v2/prompts/login-password/partials")
  http = Net::HTTP.new(url.host, url.port)
  http.use_ssl = true
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE
  request = Net::HTTP::Put.new(url)
  request["authorization"] = 'Bearer {mgmtApiToken}'
  request["content-type"] = 'application/json'
  request.body = "{"login-password":{"form-footer-start":"<form method=\"post\" data-form-secondary=\"true\"><input type=\"hidden\" name=\"state\" value=\"{{state}}\"> <input type=\"hidden\" name=\"connection\" value=\"email\"> <button type=\"submit\" id=\"switchConnectionButton\" style=\"background: #635dff; width: 100%; padding: 12px 16px; border: none; color: white;\" data-action-button-secondary=\"true\"> <span>Send a secure code by email</span> </button></form>"}}"
  response = http.request(request)
  puts response.read_body
  ``` lines
  ```swift Swift
  import Foundation
  let headers = [
  "authorization": "Bearer {mgmtApiToken}",
  "content-type": "application/json"
  ]
  let parameters = ["login-password": ["form-footer-start": "<form method=\"post\" data-form-secondary=\"true\"><input type=\"hidden\" name=\"state\" value=\"{{state}}\"> <input type=\"hidden\" name=\"connection\" value=\"email\"> <button type=\"submit\" id=\"switchConnectionButton\" style=\"background: #635dff; width: 100%; padding: 12px 16px; border: none; color: white;\" data-action-button-secondary=\"true\"> <span>Send a secure code by email</span> </button></form>"]] as [String : Any]
  let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
  let request = NSMutableURLRequest(url: NSURL(string: "https://{yourDomain}/api/v2/prompts/login-password/partials")! as URL,
  cachePolicy: .useProtocolCachePolicy,
  timeoutInterval: 10.0)
  request.httpMethod = "PUT"
  request.allHTTPHeaderFields = headers
  request.httpBody = postData as Data
  let session = URLSession.shared
  let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
  print(error)
  } else {
  let httpResponse = response as? HTTPURLResponse
  print(httpResponse)
  }
  })
  dataTask.resume()
  ````
</AuthCodeGroup>

As a result, a **Send a secure code by email button** is added to the `login-password` screen. When a user selects this button, it submits a form body containing the login state parameter and the name of the desired connection.

Similarly, you can configure the `login-passwordless` prompt using the [Set partials for a prompt](/docs/ja-JP/api/management/v2/prompts/put-partials) endpoint:

<AuthCodeGroup>
  ````bash cURL theme={null}
  curl --request PUT \
  --url 'https://{yourDomain}/api/v2/prompts/login-passwordless/partials' \
  --header 'authorization: Bearer {mgmtApiToken}' \
  --header 'content-type: application/json' \
  --data '{"login-passwordless-email-code":{"form-footer-start":"   Use Password Instead "}}'
  ``` lines
  ```csharp C#
  var client = new RestClient("https://{yourDomain}/api/v2/prompts/login-passwordless/partials");
  var request = new RestRequest(Method.PUT);
  request.AddHeader("authorization", "Bearer {mgmtApiToken}");
  request.AddHeader("content-type", "application/json");
  request.AddParameter("application/json", "{"login-passwordless-email-code":{"form-footer-start":"   Use Password Instead "}}", ParameterType.RequestBody);
  IRestResponse response = client.Execute(request);
  ````

  ````go Go theme={null}
  package main
  import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
  )
  func main() {
  url := "https://{yourDomain}/api/v2/prompts/login-passwordless/partials"
  payload := strings.NewReader("{"login-passwordless-email-code":{"form-footer-start":"   Use Password Instead "}}")
  req, _ := http.NewRequest("PUT", url, payload)
  req.Header.Add("authorization", "Bearer {mgmtApiToken}")
  req.Header.Add("content-type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)
  fmt.Println(res)
  fmt.Println(string(body))
  }
  ``` lines
  ```java Java
  HttpResponse response = Unirest.put("https://{yourDomain}/api/v2/prompts/login-passwordless/partials")
  .header("authorization", "Bearer {mgmtApiToken}")
  .header("content-type", "application/json")
  .body("{"login-passwordless-email-code":{"form-footer-start":"   Use Password Instead "}}")
  .asString();
  ````

  ````javascript Node.JS theme={null}
  var axios = require("axios").default;
  var options = {
  method: 'PUT',
  url: 'https://{yourDomain}/api/v2/prompts/login-passwordless/partials',
  headers: {authorization: 'Bearer {mgmtApiToken}', 'content-type': 'application/json'},
  data: {
  'login-passwordless-email-code': {
  'form-footer-start': '   Use Password Instead '
  }
  }
  };
  axios.request(options).then(function (response) {
  console.log(response.data);
  }).catch(function (error) {
  console.error(error);
  });
  ``` lines
  ```objc Obj-C
  #import 
  NSDictionary \*headers = @{ @"authorization": @"Bearer {mgmtApiToken}",
  @"content-type": @"application/json" };
  NSDictionary \*parameters = @{ @"login-passwordless-email-code": @{ @"form-footer-start": @"   Use Password Instead " } };
  NSData \*postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
  NSMutableURLRequest \*request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://{yourDomain}/api/v2/prompts/login-passwordless/partials"]
  cachePolicy:NSURLRequestUseProtocolCachePolicy
  timeoutInterval:10.0];
  [request setHTTPMethod:@"PUT"];
  [request setAllHTTPHeaderFields:headers];
  [request setHTTPBody:postData];
  NSURLSession \*session = [NSURLSession sharedSession];
  NSURLSessionDataTask \*dataTask = [session dataTaskWithRequest:request
  completionHandler:^(NSData \*data, NSURLResponse \*response, NSError \*error) {
  if (error) {
  NSLog(@"%@", error);
  } else {
  NSHTTPURLResponse \*httpResponse = (NSHTTPURLResponse \*) response;
  NSLog(@"%@", httpResponse);
  }
  }];
  [dataTask resume];
  ````

  ````php PHP theme={null}
  $curl = curl_init();
  curl_setopt_array($curl, [
  CURLOPT_URL => "https://{yourDomain}/api/v2/prompts/login-passwordless/partials",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{"login-passwordless-email-code":{"form-footer-start":"   Use Password Instead "}}",
  CURLOPT_HTTPHEADER => [
  "authorization: Bearer {mgmtApiToken}",
  "content-type: application/json"
  ],
  ]);
  $response = curl_exec($curl);
  $err = curl_error($curl);
  curl_close($curl);
  if ($err) {
  echo "cURL Error #:" . $err;
  } else {
  echo $response;
  }
  ``` lines
  ```python Python
  import http.client
  conn = http.client.HTTPSConnection("")
  payload = "{"login-passwordless-email-code":{"form-footer-start":"   Use Password Instead "}}"
  headers = {
  'authorization': "Bearer {mgmtApiToken}",
  'content-type': "application/json"
  }
  conn.request("PUT", "/{yourDomain}/api/v2/prompts/login-passwordless/partials", payload, headers)
  res = conn.getresponse()
  data = res.read()
  print(data.decode("utf-8"))
  ````

  ````ruby Ruby theme={null}
  require 'uri'
  require 'net/http'
  require 'openssl'
  url = URI("https://{yourDomain}/api/v2/prompts/login-passwordless/partials")
  http = Net::HTTP.new(url.host, url.port)
  http.use_ssl = true
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE
  request = Net::HTTP::Put.new(url)
  request["authorization"] = 'Bearer {mgmtApiToken}'
  request["content-type"] = 'application/json'
  request.body = "{"login-passwordless-email-code":{"form-footer-start":"   Use Password Instead "}}"
  response = http.request(request)
  puts response.read_body
  ``` lines
  ```swift Swift
  import Foundation
  let headers = [
  "authorization": "Bearer {mgmtApiToken}",
  "content-type": "application/json"
  ]
  let parameters = ["login-passwordless-email-code": ["form-footer-start": "   Use Password Instead "]] as [String : Any]
  let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
  let request = NSMutableURLRequest(url: NSURL(string: "https://{yourDomain}/api/v2/prompts/login-passwordless/partials")! as URL,
  cachePolicy: .useProtocolCachePolicy,
  timeoutInterval: 10.0)
  request.httpMethod = "PUT"
  request.allHTTPHeaderFields = headers
  request.httpBody = postData as Data
  let session = URLSession.shared
  let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
  print(error)
  } else {
  let httpResponse = response as? HTTPURLResponse
  print(httpResponse)
  }
  })
  dataTask.resume()
  ````
</AuthCodeGroup>
