auth

について auth submodule allows you to work with Wix authentication and permissions.

重要だ:

This submodule is not intended for use with self-hosted Apps.

Import statement

コピー
1

Methods

elevate()

Receives an SDK function and returns an instance of the same function that runs with the authentication and permissions of the current app.

Use elevate() in frontend environments such as site または dashboard extensions when you need to make a call with Wixアプリ authentication.

Learn more about elevated permissions.

重要だ:
  • Exposed elevated function calls create a security risk for privilege escalation attacks. Make sure to protect your exposed function calls with the appropriate logic.
  • This method can only be used in the code for an app's backend extensions.

Syntax

コピー
1

Parameters

名称タイプ説明
sourceFunctionfunctionSDK function to elevate.

リターン

An SDK function that runs with app-level permissions.

Create a new product with elevated permissions:

コピー
1
役に立ちましたか?
はい
いいえ