0.6.1 • Published 9 months ago

kubeblocks-auth0-actions v0.6.1

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

Auth0 Action Secret

Secrets allow you to securely define secret or privileged values that can be accessed in your running code as properties of the event.secrets object.

export type Secrets = {
  OPENAPI_ENDPOINT: string,  // apecloud openapi Endpoint
  OPENAPI_ADMIN_TOKEN: string, // apecloud openapi admin basic token
  AUTH0_DOMAIN: string,
  AUTH0_SPA_CLIENT_ID: string,
  AUTH0_M2M_CLIENT_ID: string,
  AUTH0_M2M_CLIENT_SECRET: string,
}
const secret: Secrets = {
  ...
  ...
  ...
};
const TOKEN = Buffer.from(JSON.stringify(secret)).toString("base64");

PreUserRegistrationEvent

// @ts-nocheck
/**
  * Handler that will be called during the execution of a PreUserRegistration flow.
  *
  * @param {PreUserRegistrationEvent} event - Details about the context and user that is attempting to register.
  * @param {PreUserRegistrationAPI} api - Interface whose methods can be used to change the behavior of the signup.
  */

const { KubeblocksAuth0Actions } = require('kubeblocks-auth0-actions');
exports.onExecutePreUserRegistration = async (event, api) => {
  const { onExecutePreUserRegistration } = new KubeblocksAuth0Actions(event.secrets.TOKEN)
  onExecutePreUserRegistration(event, api)
};

onExecutePostUserRegistration

/**
* Handler that will be called during the execution of a PostUserRegistration flow.
*
* @param {Event} event - Details about the context and user that has registered.
* @param {PostUserRegistrationAPI} api - Methods and utilities to help change the behavior after a signup.
*/
const { KubeblocksAuth0Actions } = require('kubeblocks-auth0-actions');
exports.onExecutePostUserRegistration = async (event, api) => {
  const { onExecutePostUserRegistration } = new KubeblocksAuth0Actions(event.secrets.TOKEN)
  onExecutePostUserRegistration(event, api)
};

onExecutePostLogin

/**
* Handler that will be called during the execution of a PostLogin flow.
*
* @param {Event} event - Details about the user and the context in which they are logging in.
* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.
*/

const { KubeblocksAuth0Actions } = require('kubeblocks-auth0-actions');
exports.onExecutePostLogin = async (event, api) => {
  const { onExecutePostLogin } = new KubeblocksAuth0Actions(event.secrets.TOKEN);
  onExecutePostLogin(event, api);
};

/**
* Handler that will be invoked when this action is resuming after an external redirect. If your
* onExecutePostLogin function does not perform a redirect, this function can be safely ignored.
*
* @param {Event} event - Details about the user and the context in which they are logging in.
* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.
*/
// exports.onContinuePostLogin = async (event, api) => {
// };
0.6.1

9 months ago

0.6.0

9 months ago

0.3.75

11 months ago

0.3.74

11 months ago

0.3.73

11 months ago

0.3.72

11 months ago

0.4.9

10 months ago

0.3.71

11 months ago

0.4.8

10 months ago

0.3.70

11 months ago

0.3.79

11 months ago

0.3.78

11 months ago

0.3.77

11 months ago

0.3.76

11 months ago

0.3.64

11 months ago

0.3.63

11 months ago

0.3.62

11 months ago

0.3.61

11 months ago

0.3.60

11 months ago

0.3.69

11 months ago

0.3.68

11 months ago

0.3.67

11 months ago

0.3.66

11 months ago

0.3.65

11 months ago

0.3.0

11 months ago

0.3.1

11 months ago

0.3.53

11 months ago

0.3.52

11 months ago

0.3.51

11 months ago

0.3.50

11 months ago

0.3.59

11 months ago

0.3.58

11 months ago

0.3.57

11 months ago

0.3.56

11 months ago

0.3.55

11 months ago

0.3.54

11 months ago

0.4.10

10 months ago

0.3.41

11 months ago

0.3.40

11 months ago

0.3.49

11 months ago

0.3.47

11 months ago

0.3.46

11 months ago

0.3.45

11 months ago

0.4.11

10 months ago

0.3.44

11 months ago

0.4.12

10 months ago

0.3.43

11 months ago

0.4.5

11 months ago

0.4.4

11 months ago

0.4.7

11 months ago

0.4.6

11 months ago

0.4.1

11 months ago

0.4.3

11 months ago

0.4.2

11 months ago

0.3.31

11 months ago

0.3.30

11 months ago

0.3.39

11 months ago

0.3.38

11 months ago

0.3.37

11 months ago

0.3.36

11 months ago

0.3.35

11 months ago

0.3.34

11 months ago

0.3.33

11 months ago

0.3.32

11 months ago

0.3.29

11 months ago

0.3.20

11 months ago

0.3.28

11 months ago

0.3.27

11 months ago

0.3.26

11 months ago

0.3.25

11 months ago

0.3.24

11 months ago

0.3.23

11 months ago

0.3.22

11 months ago

0.3.21

11 months ago

0.3.19

11 months ago

0.3.18

11 months ago

0.5.0

10 months ago

0.3.17

11 months ago

0.3.16

11 months ago

0.3.15

11 months ago

0.3.14

11 months ago

0.3.13

11 months ago

0.3.12

11 months ago

0.3.11

11 months ago

0.3.86

11 months ago

0.3.85

11 months ago

0.3.84

11 months ago

0.3.83

11 months ago

0.3.82

11 months ago

0.3.81

11 months ago

0.3.80

11 months ago

0.3.89

11 months ago

0.3.88

11 months ago

0.3.87

11 months ago

0.2.1

11 months ago

0.2.0

11 months ago

0.2.7

11 months ago

0.2.6

11 months ago

0.2.3

11 months ago

0.2.2

11 months ago

0.2.5

11 months ago

0.2.4

11 months ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago

1.0.0

1 year ago