Authing DocsDocuments
Concept
workflow
Guides
Development Integration
Application integration
Concept
workflow
Guides
Development Integration
Application integration
Old Version
Guides
  • Quick start

  • Authenticate the user

  • Authority management for users

  • Authorization

  • Manage user accounts

  • Manage User Directory

  • Management Application

  • Become a source of federal authentication identity

  • Connect to an external identity provider (IdP)

  • Open up WeChat ecology
  • Migrate users to Authing

  • Management organization

  • Expandable capabilities

    • Use Webhook to monitor user events
    • Custom authentication process (Pipeline)

      • Create your first Pipeline function
      • Pipeline API Reference
      • Pipeline application scenario
      • Pipeline User Object
      • Pipeline Context Object
      • Use environment variables in Pipeline
      • Available Node Modules
      • How to debug
      • FAQ
      • Private deployment
  • Audit Log

  • Configure security information

  • Configure user pool information

  • Deployment plan

  • Frequently Asked Questions FAQs

  1. Guides
  2. /
  3. Expandable capabilities
  4. /
  5. Custom authentication process (Pipeline)
  6. /
  7. Use environment variables in Pipeline

¶ Use environment variables in pipeline

Update Time: 2025-02-18 09:00:47
Edit

The environment variables in the Pipeline function are consistent with the concept of environment variables in the operating system, and developers can get them through the global variable env. Environment variables are visible to all Pipelien functions in the application pool.

You can configure environment variables on the Setting - Environment Variable:

Environment variables are a set of Key-Value Pair values, which can be used to save data such as WebHook links and keys.

After entering Key and Value, click Add:

We set an environment variable whose Key is LARK_WEBHOOK,and the corresponding value can be obtained through env.LARK_WEBHOOK in the Pipeline function.

async function pipe(user, context, callback) {
  const webhook = env.LARK_WEBHOOK;
  await axios.post(webhook, {
    title: "New User Registered - From {{$localeConfig.brandName}} Rules Pipeline",
    text: `
                用户信息:
                ID: ${user.id}
                昵称:${user.username}
                注册方式:${user.registerSource}
                邮箱:${user.email}
                手机号:${user.phone}
                UA: ${user.device}
                用户池 ID: ${user.userPoolId}
          `,
  });
  return callback(null, user, context);
}
Prev: Pipeline Context Object Next: Available Node Modules

User identity management

Integrated third-party login
Mobile phone number flash check (opens new window)
Universal login form component
Custom authentication process

Enterprise internal management

Single Sign On
Multi-factor Authentication
Authority Management

Developers

Development Document
Framework Integration
Blog (opens new window)
GitHub (opens new window)
Community User Center (opens new window)

Company

400 888 2106
sales@authing.cn
16 / F, Block B, NORTH STAR CENTURY CENTER, Beijing(Total)
room 406, 4th floor, zone B, building 1, No. 200, Tianfu Fifth Street, Chengdu(branch)

Beijing ICP No.19051205-1

© Beijing Steamory Technology Co.