How to find a login cookie name
Learn how to find the name of your login cookie
Identifying your login cookie name is easy, you will only need to use the developer tools that are built into your browser.
In this guide, we will be using Chrome, but most browsers nowadays will allow you to use developer tools, just keep in mind that the name and position of some elements might be slightly different.
1 - Open your login screen
Type in your website's login screen on your browser’s address bar and hit enter.
2 - Open the developer tools
You can right-click on your screen (on any element) and find the "Inspect" option or simply press F12 to open the developer tools. It will look as follows:
3 - Go to the "Network" tab
With the developer tools open, you should be able to see a tab called "Network"
4 - Reload your page
In order to load your website information into the Network tab reload your page by clicking the "Reload" button on your browser, or simply press F5.
5 - Find the main HTTPS request
As the page loads, you will start to see a whole bunch of data being displayed on the developer tool, you will want to scroll to the very top of the list and click on the first item of the list:
6 - Find the cookies
You will see a few new options on the right side, find the tab that says "Cookies" and click on it. This area will display all cookies that are set by your website when the page is loaded. We'd recommend taking a screenshot or just looking into the list carefully, as you will need to compare it with the list that will show once you are logged in.
6 - Login
Now that you are seeing the cookies, with your developer tool opened, log in to your website.
7 - Review your cookie list
After the login, you will need to find the final destination URL in the list of requests, in our example, it was the second item on the list, as you can see below:
Under the cookies area, you will now need to look for a cookie that refers to the user login. This will usually be a new cookie, that was not in the last prior to the login, and its name will usually contain some reference to the login functionality, as you can see below:
In this case, you can see that the cookie name is “wordpress_logged_in_3fe39b…”
The numbers at the end will always be different, every time a user logs in, but the first part is always the same.
That's it! You should have been able to find your login cookie name by following the instructions above, if you are still unsure about your login cookie name, our team will be happy to assist while building your app.