# 10.2 Set Auto-login to WordPress Website

To ensure everything stays secure, let's follow these steps carefully together!

**Step 1:** In the plugin options page, add an authentication key. This will work as a password, and you should change it as you would change your password. If you want to disable the auto login feature, leave this field blank.

<figure><img src="/files/5GR89c0Q5PIyZQhYrvbr" alt=""><figcaption></figcaption></figure>

**Step 2:** Create a custom value in your CRM named `lcw_auth_key` and set the same value you added in step 1.

Step 3: Create a trigger link in your CRM with the following pattern

\
website\_link?lcw\_auto\_login=1\&lcw\_auth\_key=authentication\_key\&email=customer\_email\&redirect\_to=slug\_of\_the\_page\_where\_you\_want\_to\_redirect\_after\_login

Explanation:

1. website\_link: the website link where customers will be logged in
2. lcw\_auto\_login: It's a required parameter & the value will be always 1
3. lcw\_auth\_key: the authentication key that you provided in step 1.
4. email: The email of the customer who will be logged in.
5. redirect\_to: This is an optional parameter. Add the slug of a page where you want to redirect your customer after login. Default value: home page.

```
// The trigger link will look like
{{ custom_values.membership_wp_website_link }}?lcw_auto_login=1
&lcw_auth_key={{ custom_values.lcw_auth_key }}
&email={{contact.email}}&redirect_to=/
```

Provide this link to the customer for direct access to their purchased item. You can send the trigger link directly or link it to a text.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://better-wizard.gitbook.io/lead-connector-wizard/crm-wp-communication/autologin-to-wp-website.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
