Integrations
Table of contents

WordPress

This family groups a set of actions related with WordPress signup and login flows.

These actions require you to have previously installed our WordPress plugin.

Signup

Sign up users with email and password or just with an email (passwordless signup).

Input settings

Parameter Description
Base URL (required) This is the base URL from your WordPress installation. You can find it under "Arengu Auth" sidebar menu in your WordPress site.
API key (required) This is the API key to authenticate your requests. You can find it under "Arengu Auth" sidebar menu in your WordPress site.
Email (required) The user email.
Password The user plain password. If you don't provide a password a random one will be generated.
Redirect URI The URL where you want to redirect the user after a succesful authentication. By default it's the user account page.
JWT expiration time Number of seconds that the JWT will be valid. By default it's 300 (5 minutes).
Meta An object with key-value pairs with user meta data.

Output object

Property Type Description
id Number The user ID in your WordPress database.
email String The user email.
first_name String The user first name.
last_name String The user last name.
token String A signed JSON web token (JWT), containing sub (the user ID), email (the user email) and optionally redirect_uri with the absolute or relative URL the user will be redirected after the login. If the latter is not specified, the user will be redirected to the home page.
login_url String Destination URL to sign in the user exchanging the generated token with a valid WordPress session.

Output object example

{
  "user": {
    "id": 1990,
    "email": "jane.doe@arengu.com",
    "first_name": "Jane",
    "last_name": "Doe"
  },
  "token": "eyJ0eXAiOiJKV1Q...",
  "login_url": "https://foo.bar/wp-json/arengu_auth/login_jwt/eyJ0eXAiOiJKV1Q..."
}

Login

Log in users with email and password.

Input settings

Parameter Description
Base URL (required) This is the base URL from your WordPress installation. You can find it under "Arengu Auth" sidebar menu in your WordPress site.
API key (required) This is the API key to authenticate your requests. You can find it under "Arengu Auth" sidebar menu in your WordPress site.
Email (required) The user email.
Password (required) The user plain password.
Redirect URI The URL where you want to redirect the user after a succesful authentication. By default it's the user account page.
JWT expiration time Number of seconds that the JWT will be valid. By default it's 300 (5 minutes).

Output object

Property Type Description
id Number The user ID in your WordPress database.
email String The user email.
first_name String The user first name.
last_name String The user last name.
token String A signed JSON web token (JWT), containing sub (the user ID), email (the user email) and optionally redirect_uri with the absolute or relative URL the user will be redirected after the login. If the latter is not specified, the user will be redirected to the home page.
login_url String Destination URL to sign in the user exchanging the generated token with a valid WordPress session.

Output object example

{
  "user": {
    "id": 1990,
    "email": "jane.doe@arengu.com",
    "first_name": "Jane",
    "last_name": "Doe"
  },
  "token": "eyJ0eXAiOiJKV1Q...",
  "login_url": "https://foo.bar/wp-json/arengu_auth/login_jwt/eyJ0eXAiOiJKV1Q..."
}

Passwordless login

Authenticate users without password.

Input settings

Parameter Description
Base URL (required) This is the base URL from your WordPress installation. You can find it under "Arengu Auth" sidebar menu in your WordPress site.
API key (required) This is the API key to authenticate your requests. You can find it under "Arengu Auth" sidebar menu in your WordPress site.
Email (required) The user email.
Redirect URI The URL where you want to redirect the user after a succesful authentication. By default it's the user account page.
JWT expiration time Number of seconds that the JWT will be valid. By default it's 300 (5 minutes).

Output object

Property Type Description
id Number The user ID in your WordPress database.
email String The user email.
first_name String The user first name.
last_name String The user last name.
token String A signed JSON web token (JWT), containing sub (the user ID), email (the user email) and optionally redirect_uri with the absolute or relative URL the user will be redirected after the login. If the latter is not specified, the user will be redirected to the home page.
login_url String Destination URL to sign in the user exchanging the generated token with a valid WordPress session.

Output object example

{
  "user": {
    "id": 1990,
    "email": "jane.doe@arengu.com",
    "first_name": "Jane",
    "last_name": "Doe"
  },
  "token": "eyJ0eXAiOiJKV1Q...",
  "login_url": "https://foo.bar/wp-json/arengu_auth/login_jwt/eyJ0eXAiOiJKV1Q..."
}

Check existing email

Check if an email exists in your database.

Input settings

Parameter Description
Base URL (required) This is the base URL from your WordPress installation. You can find it under "Arengu Auth" sidebar menu in your WordPress site.
API key (required) This is the API key to authenticate your requests. You can find it under "Arengu Auth" sidebar menu in your WordPress site.
Email (required) The user email.

Output object

Property Type Description
email_exists Boolean Indicates if the email already exists or not returning a true or false value.

Output object example

{
  "email_exists": true
}