Closed Fasih-Techx closed 1 year ago
You give very little information for the author or anyone to try and reproduce the issue... I have been using this for over a year and haven't got any trouble remotely similar to what you are describing... versions, detailed steps to reproduce would go a long way.
Sorry, I didn't know before how this problem was happening or what was actually the problem. I run some tests and edited the description of the error. @dani3l3 Please let me know I this information is enough and if someone can help.
Varnish Cache was the culprit. disabling it solved the problem
Bug Report
The simple jwt login doesn't work with the URL for the first time it only works on the second try. I tried to remove cookies and incognito mode but same issue.
Plugin Version
Version 3.5.0
PHP Version
Version 8.1
WordPress Version
Version 6.2.2.2
Bug description
I want to auto-login and redirect the users to the home page without interacting with the wp-admin page.
The JWT Login shows success in Postman when the redirect mode is none. even if you run the auto-login 1000 times.
When I change the redirect mode in the settings from none to Dashboard and then run the auto login API it redirects to the login page, after that if I run it again it will log me in properly. (seems like the cookies don't store on 1st attempt)
When the redirect mode is changed to Homepage or Custom Url it shows no cookies received in postman.
My conclusion is most likely storing the cookies is not working when the wp-admin is not accessed prior to auto-login.
Hosting
Cloudways (with Cloudflare enterprise) Cloudflare bot protection & DDos is On
Other installed plugins
Perfmatters cloudways bot protection Defender Pro
Additional
I tried to run all the above mention scenarios on Postman and Chrome incognito mode multiple times with all the plugins and Cloudflare enabled and after disabling Cloudflare and all other plugins the results are the same. However, I tried on my other website which is hosted on another Host auto-login working fine there without any issues.
Update
I tried some more testing and figured out that it's working on different hosts except Cloudways. I don't know how to deal with this because I tried to enable and disable different settings or cache etc.