Sign Up

Security

Twidget provides several built-in functions to enhance the security of your applications. Below is an overview of each security command, including its description, inputs, and outputs.

Generate ID

Description: Generates a unique identifier.

Inputs

None

Outputs

  • Type: Text

Hash Text

Description: Hashes the provided text using the bcrypt algorithm.

Inputs

  • text: The raw text to be hashed.

Outputs

  • Type: Text

Match Hashed Text

Description: Checks whether the provided raw text matches the hashed text.

Inputs

  • raw_text: The raw text.

  • hashed_text: The hashed text.

Outputs

  • Type: Boolean (true if the texts match, false otherwise)

Create Authentication Token

Description: Generates a JWT Authentication token.

Inputs

  • id: The user ID.

  • email: The user email.

  • expiration: The duration of the token's validity (in seconds).

Outputs

  • Type: Object

    • token: The authentication token (Text).

    • expires_at: The expiration date of the token (Date).

    • signature: The token signature (Text).

Get Authenticated User

Description: Returns information about the authenticated user.

Inputs

None

Outputs

  • Type: Object

    • _id: The user ID (Text).

    • created_at: The account creation date (Date).

    • email: The user email (Text).

These security commands are essential for managing authentication, securing user data, and protecting your application from unauthorized access.

Related Topics

Session Storage

Twidget includes a suite of session storage commands that enable no-code interaction with the browser’s `sessionStorage` API. These tools allow temporary storage of key-value data for the current page session. Purpose. Session storage commands allow developers to manage transient data tied to a sing...

Send External HTTP Request

Using Twidget, you can send external HTTP requests effortlessly. This functionality allows you to communicate with external servers or APIs. Below, you will find the necessary parameters and structure to set up an HTTP request. Parameters. - URL: The endpoint to which the request will be sent. - Met...

Local Storage

Twidget provides a set of local storage commands that enable interaction with the browser’s `localStorage` API through a no-code interface. These commands are useful for storing, retrieving, and managing key-value data persistently within the current domain context. Purpose. These commands abstract ...

Text

Twidget offers a variety of commands to manipulate text in various ways. To Uppercase. Converts all characters of the provided text to uppercase. - text: The text to be converted to uppercase. - A text string with all characters in uppercase. To Lowercase. Converts all characters of the provided tex...

Loops

In Twidget, loops allow you to execute commands multiple times, either based on a condition or through a set number of iterations. Loops can also be nested, meaning you can run loops within other loops, creating complex logic for your tasks. List Loop. The `List Loop` command enables you to loop thr...