Magic login link not working - SHIELD CI4 |
I am using shield for Authorization, I have created API to send magic login link, email receives with magic link. when I click on link, it's makes the user login.
Earlier this whole process was working fine, but now suddenly stopped. I tried to test the default links as well, that too not working. Showing "Unable to verify the link." error https://prnt.sc/Ws3I6O-RFjMA Below is my code PHP Code: public function forgotPassword() { Here is my code to verify link PHP Code: public function magicLogin($token) Please guide what is the issue. I searched alot regarding this, but didn't find anything regarding this. Thanks
Please Read:
CodeIgniter 4 Users Guide - IncomingRequest Class - getVar() What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Thanks for the reply, I understand this link helpful to validate the incoming request, But I can't under how this resolve my issue.
Here is the old screenshot of my code execution, by using the magic link, I was able to authorise the user. https://prnt.sc/fyba8ArKM_4I I am not understanding how does code stopped working suddenly. Thanks
Shield is too complicated to implement when connected to a project for a beginner
@pratibha.cts, I see nothing wrong with your code, I said the above because they say not to use getVar anymore.
Can you check and make sure that your email is working, google has been making email login changes that effect this. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
You can use your internet providers SMTP Mail server if you have internet connection.
I have Comcast and I use their SMTP Mail server for testing my emails. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Hi
I checked the process today again on web and postman, there is no issue with email receiving. I received email on my gmail account. https://prnt.sc/Ik00CovcsnYF https://prnt.sc/iH4Lyjq9NWWR getting this error in postman. https://prnt.sc/kUGKs8AhHyov
Are you using the newest version of postman, they had problems with some older versions.
Your Error is stating that the token is NULL. Check your generateToken() method etc. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(07-05-2024, 10:51 PM)InsiteFX Wrote: @pratibha.cts, I see nothing wrong with your code, I said the above because they say not to use getVar anymore. (07-09-2024, 10:15 PM)InsiteFX Wrote: Are you using the newest version of postman, they had problems with some older versions. Yes.... I am using latest postman version, the issue is not only in postman, token in verifying on web page also Here you can see token and stored token is same https://prnt.sc/toanChkLcsQn web screenshots https://prnt.sc/pEhJ8oTHwmU7 https://prnt.sc/UGwyr5qub3lG https://prnt.sc/klHrYl2sqXqD https://prnt.sc/f6_0U_TwNmRH Issue Screenshot https://prnt.sc/sMEi79agGdz5 the line creating issue is working in other functions, but not working here Please help. Thanks |
Welcome Guest, Not a member yet? Register Sign In |