Timeline for How to make users stay logged in across devices? [closed]
Current License: CC BY-SA 4.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 21, 2022 at 12:45 | comment | added | 4uk4 | What Drupal is doing here is migrating the anonymous session to the authenticated session. You can't loose other sessions, this only affects the session data the user might have generated while visiting the site on a new browser without logging in right away. | |
Apr 21, 2022 at 10:53 | comment | added | avpaderno♦ |
\Drupal::service('session')->migrate() calls NativeSessionStorage::regenerate() , which calls session_regenerate_id() , which could cause a lost session, when using a mobile or Wi-Fi network.
|
|
Apr 21, 2022 at 10:51 | comment | added | avpaderno♦ |
If you mean that users who log in using a different device are logged out from the device they were previously using, that could be the effect calling session_regenerate_id() has: Currently, session_regenerate_id does not handle an unstable network well, e.g. Mobile and WiFi network. Therefore, you may experience a lost session by calling session_regenerate_id.
|
|
Apr 21, 2022 at 10:40 | comment | added | avpaderno♦ |
Drupal doesn't destroy the existing session; it just copies the data from the existing session to the new one. Otherwise, it would have a \Drupal::service('session')->migrate(TRUE); line. (migrate() uses FALSE as default value for $destroy , the first parameter.)
|
|
Apr 20, 2022 at 23:34 | history | closed |
leymannx Hudri Patrick Kenny |
Not suitable for this site | |
Apr 20, 2022 at 22:11 | review | Close votes | |||
Apr 20, 2022 at 23:41 | |||||
Apr 20, 2022 at 21:20 | answer | added | mona lisa | timeline score: 2 | |
Apr 20, 2022 at 19:25 | comment | added | 4uk4 | You can stay logged in on as many devices/browsers as you want. On user level all things you store in one place will be available everywhere else. It is, however, not possible to share a PHP session. But in Drupal there is not very much which depends on the PHP session. Can you be more specific what you mean by become a little hassle? | |
Apr 20, 2022 at 19:02 | history | asked | PartyRadio | CC BY-SA 4.0 |