# Signup

Activating MarfeelPress plugin redirects to the plugin's signup page. Signing up for MarfeelPress creates a MarfeelInsight account if necessary, and starts the files creation process.

This article describes the flow for signing up for new and already registered domains, and new and existing users.

graph LR

  A[Install Plugin] --> Cookie{Does the <br/> browser have <br/> Insight cookies?}
  Cookie -->|No| Signup[Signup page]
  Cookie -->|Yes| Handshake[Register & token handshake]
  Signup --> NewEmail{Is it a <br/> new Email?}

  NewEmail --> |Yes|NewTenant{Is it a <br/> new Tenant?}
  NewEmail --> |No|Signin[Insight login]

  NewTenant-->|Yes| Handshake
  NewTenant-->|No| NewEmailAdmin{Is the user a <br/> Site Admin?}
  NewEmailAdmin --> |Yes| Handshake
  NewEmailAdmin --> |No| Signup

  Signin --> NewTenant

  Handshake --> OK{Register <br/> successful?}
  OK --> |Yes|G[Onboarding page]
  OK --> |No| Signup

  linkStyle 9,13 stroke:red,stroke-width:2px;

# Registering for the first time

When a WordPress user installs the plugin in a new domain for the first time, they land on the signup screen.

Signup

  • The tenantUri input is disabled and filled with the current domain by default.
  • The email field is pre-filled with the email of the logged-in user in WordPress.

# Domain not present in MarfeelInsight

After clicking on Getting started, the user information is sent to Insight to register it. When Insight finishes processing the secret-key of the tenant, it is saved into Wordpress's database to authenticate consequent requests to Insight.

This process is transparent for the user: after clicking on Getting started, if everything is ok, they land on the onboarding panel with everything set up.

Upon creation, the user is automatically logged-into Insight.

TIP

The user is created in Insight regardless of later issues, such as a failure creating the tenant.

Possible other outputs:

  • The email already exists: the signup page appears with the message:

This email is already registered in Marfeel. Please login below or contact us via live chat for support.

  • There is an error: the signup page appears with the message:

There has been an error while registering your URL. Please contact us via live chat for support.

# Tenant already exists in MarfeelInsight

When a user attempts to sign up an already registered tenant, there are two possible outputs:

  • The user is an administrator in the WordPress site: They are assigned to the already existing tenant and redirected to the onboarding page.

  • The user is not an administrator in the WordPress site, or the user exists in Insight: the signup page appears with the message:

This URL is already registered in Marfeel. Please login below or contact us via live chat for support.

We cannot create a tenant already existing nor give permissions to a new user to that Media Group if it's not an admin in WordPress. The only option is for the client to log in (or contact support for the new email address to be added to the Media Group).

# Sign in an already existing tenant

When a tenant re-activates the plugin, Insight deletes the secret key and restarts the token-handshake to ensure everything is secure.

# Logged-in user & existing tenant

When the user is already logged in and has an Insight session open in the browser at the moment of activation, the token-handshake happens invisibly to them. If it is successful, they land on the onboarding panel directly with everything setup. If there is a problem with the token-handshake, they see the signup page.

# Logged-out user & existing tenant

The user lands on the signup page. Since both the tenant and email are registered, the form can't be submitted. The user sees a prompt which reads:

Already have an account? Log in

The link points to Insight's login form. Once logged in, the user is redirected back to the WordPress onboarding with everything setup.

# Password forgotten

When a user doesn't remember their password, they can recover it by clicking on the Forgot password? link.

# Sign in a new tenant

When the user exists in Insight, but the tenant doesn't.

# Logged-in user & new tenant

The automatic token-handshake creates the tenant in the user's first Media Group. Instead of the signup page, the user sees the onboarding panel.

# Logged-out user & new tenant

The user sees the signup page. Since the email already exists, it is not possible to register the tenant from that page. The only option is to log in using the

Already have an account? Log in.

link. Once the user authenticates, the process is the same as in signup: the tenant is created in the first Media Group of the user. Afterward, the user sees the onboarding with everything setup.