Welcome Guest, Not a member yet? Register   Sign In
Myth:Auth
#17

(04-24-2020, 08:06 AM)InsiteFX Wrote: You might be able to try using a __deconstruct in your BaseController and
destroy the users session.

Thank you @InsiteFX for your new reply.
But forgive me if I don't think what you've pointed out might be a solution... Why should I destroy the session in the __deconstruct?
I think it is correct to set $sessionExpiration=0 in Config\App (this way if the browser is closed the session will be deleted, so the user is no longer logged in when the browser is opened again); the only problem is that there is something wrong with "remember me" option.
I analyzed a bit the source of Myth:Auth (even if I'm a bit incapable). There is a rememberUser function inside AuthenticationBase that is called when the user checks the "remember me" box; it saves a record in the DB (this works fine!); then it should save a "remember" cookie via HTTP Responses. But it seems that this cookie is not saved...! I see the ci_session cookie, but not the "remember". For this reason the check function inside LocalAuthenticator fails, not finding the "remember" cookie set.
I tried to set a cookie through a normal set_cookie (by calling the CI helper); if I do it inside Myth:Auth cookie is not saved; if I do it inside my Dashboard controller (which extends BaseController, in the namespace App\Controllers), I see the cookie save itself.

What I would like to understand is if it's possible that there is a small bug in saving this cookie, or maybe it's due to an error of mine in integrating the library in my project (even if everything else works perfectly) or to a configuration of mine.

I don't want to be rude to continue on this thread; if you think it's better to open a new one please tell me ;-)

Thank you for your patience.
Reply


Messages In This Thread
Myth:Auth - by kilishan - 12-11-2019, 10:49 PM
RE: Myth:Auth - by MGatner - 12-12-2019, 04:31 AM
RE: Myth:Auth - by InsiteFX - 12-12-2019, 05:46 AM
RE: Myth:Auth - by Basic App - 12-17-2019, 07:33 AM
RE: Myth:Auth - by MGatner - 12-17-2019, 07:36 AM
RE: Myth:Auth - by Basic App - 12-17-2019, 08:52 AM
RE: Myth:Auth - by kilishan - 12-17-2019, 08:56 AM
RE: Myth:Auth - by skechav - 01-02-2020, 02:32 PM
RE: Myth:Auth - by BilltheCat - 02-02-2020, 06:18 PM
RE: Myth:Auth - by InsiteFX - 02-03-2020, 08:56 AM
RE: Myth:Auth - by BilltheCat - 02-03-2020, 09:45 AM
RE: Myth:Auth - by muuucho - 04-13-2020, 10:52 PM
RE: Myth:Auth - by destez - 04-21-2020, 01:30 AM
RE: Myth:Auth - by InsiteFX - 04-21-2020, 03:29 AM
RE: Myth:Auth - by destez - 04-21-2020, 03:36 AM
RE: Myth:Auth - by InsiteFX - 04-24-2020, 08:06 AM
RE: Myth:Auth - by destez - 04-24-2020, 03:29 PM
RE: Myth:Auth - by InsiteFX - 04-25-2020, 08:21 AM
RE: Myth:Auth - by destez - 04-25-2020, 08:41 AM
RE: Myth:Auth - by destez - 04-25-2020, 03:08 PM
RE: Myth:Auth - by nfaiz - 04-25-2020, 06:17 PM
RE: Myth:Auth - by dodjiD - 06-20-2020, 07:29 PM
RE: Myth:Auth - by jim1001 - 08-07-2020, 08:08 AM
RE: Myth:Auth - by InsiteFX - 08-08-2020, 10:36 AM
RE: Myth:Auth - by jim1001 - 08-09-2020, 10:53 AM
RE: Myth:Auth - by InsiteFX - 08-09-2020, 11:09 AM
RE: Myth:Auth - by jim1001 - 08-18-2020, 04:26 AM
RE: Myth:Auth - by jim1001 - 08-18-2020, 06:57 AM
RE: Myth:Auth - by InsiteFX - 08-18-2020, 08:53 AM
RE: Myth:Auth - by MGatner - 08-18-2020, 10:08 AM
RE: Myth:Auth - by jim1001 - 08-18-2020, 11:34 AM
RE: Myth:Auth - by jim1001 - 08-19-2020, 09:59 AM
RE: Myth:Auth - by InsiteFX - 08-19-2020, 12:08 PM
RE: Myth:Auth - by jim1001 - 08-19-2020, 01:23 PM
RE: Myth:Auth - by aschmitz - 11-08-2020, 09:33 AM
RE: Myth:Auth - by InsiteFX - 11-08-2020, 12:06 PM
RE: Myth:Auth - by aschmitz - 11-09-2020, 03:46 PM
RE: Myth:Auth - by MGatner - 11-10-2020, 05:43 AM
RE: Myth:Auth - by aschmitz - 11-10-2020, 08:42 AM
RE: Myth:Auth - by suvi - 11-12-2020, 05:27 AM
RE: Myth:Auth - by InsiteFX - 11-13-2020, 01:06 AM
RE: Myth:Auth - by suvi - 11-13-2020, 06:11 AM
RE: Myth:Auth - by InsiteFX - 11-13-2020, 01:08 PM
RE: Myth:Auth - by suvi - 11-15-2020, 09:19 AM
RE: Myth:Auth - by InsiteFX - 11-15-2020, 01:56 PM
RE: Myth:Auth - by suvi - 11-15-2020, 03:54 PM
RE: Myth:Auth - by lan89 - 12-05-2020, 01:39 PM
RE: Myth:Auth - by MGatner - 12-06-2020, 05:33 AM
RE: Myth:Auth - by lan89 - 12-06-2020, 06:26 AM
How to use the invitation feature? - by suvi - 12-30-2020, 06:29 AM
RE: Myth:Auth - by InsiteFX - 12-31-2020, 04:09 AM
RE: Myth:Auth - by suvi - 12-31-2020, 08:18 AM
RE: Myth:Auth - by MGatner - 12-31-2020, 08:20 AM
RE: Myth:Auth - by suvi - 12-31-2020, 12:41 PM
RE: Myth:Auth - by MGatner - 01-01-2021, 06:52 AM
RE: Myth:Auth - by suvi - 01-02-2021, 01:40 PM
RE: Myth:Auth - by klj - 01-08-2021, 03:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB