Skip to content

Create your first Pipeline function

Pipeline functions are custom JavaScript code executed during the GenAuth authentication process. With Pipeline, developers can easily customize and extend the capabilities of GenAuth.

Step 1: Choose a Pipeline template

GenAuth provides many out-of-the-box templates to help you get started quickly.

TIP

You can also view the list of Pipeline template functions here: https://github.com/authing/pipeline. At the same time, you are welcome to use your talents and contribute Pipeline template functions to us.

  1. Select a trigger scene:

Select a trigger scene

  1. Select Register email suffix whitelist in access control.

Register email suffix whitelist

Step 2: Create a Pipeline function

  1. Here we set the domain name whitelist to example.com, you can also customize it.

  1. Click the Create button in the lower left corner. We will deploy this function to the cloud. It will take some time, please be patient.

The page returns to the Pipeline function list page, and you can see the Pipeline function we just added.

TIP

If you have multiple Pipeline functions, you can drag the leftmost button to sort them.

Step 3: Verify whether the whitelist is valid

  1. First, register with an email address that does not have the suffix example.com. The system prompts "Access Denied." This is the prompt message we specified in the custom Pipeline function.
  1. Then register with an email address with the suffix example.com. Registration is successful!

Step 4: You may also need to

Agent infrastructure for identity, memory, and web action.