Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.40rc3] "Remember me" doesn't stick #3426

Closed
foosel opened this issue Jan 13, 2020 · 7 comments
Closed

[1.40rc3] "Remember me" doesn't stick #3426

foosel opened this issue Jan 13, 2020 · 7 comments

Comments

@foosel
Copy link
Owner

@foosel foosel commented Jan 13, 2020

Not a huge issue, and probably part of the new permissions system, but I often find I've been logged out. I checked the "Remember me" button but it's seeming like my sessions only last about a day or so. I've clicked through the options to see if there is an auto-timeout configured anywhere and don't see anything like that. I have created a second user to test the access permissions, don't know if that might trigger an auto-logout, or if maybe the issue is possibly something on my browser. (Chrome running at latest version on mac)

If there is some sort of new auto-logout feature, I'd suggest having the ability to disable that, especially for single-user setups. I'm guessing many installs are a simple at-home setup (like mine) and most folks aren't going to want to login repeatedly.

Originally posted by @ChrisHeerschap in #3389 (comment)

@ChrisHeerschap

This comment has been minimized.

Copy link

@ChrisHeerschap ChrisHeerschap commented Jan 13, 2020

I've been seeing this consistently since reporting it - have been trying to rule anything out on my end. I run uBlock Origin and Privacy Badger on my systems and those shouldn't be affecting things but I've disabled them on my 1.40rc3 page and can't say if it has consistently helped or had any effect.

Let me know anything I can test or try to contribute to fixing this. One thing that may be contributing is I usually hit my 1.40rc3 system from any of three laptops, one desktop system, and occasionally my phone. Don't know if the multiple logins might contribute. Even if it is something unique to my environment, it might be something you run into when 1.40 goes live and it would be good to know the workarounds.

@ChrisHeerschap

This comment has been minimized.

Copy link

@ChrisHeerschap ChrisHeerschap commented Jan 15, 2020

Well, it wasn't those two things - my 1.40 has been in an active tab all day long and I just switched to it and I was logged out.

@CapnBry

This comment has been minimized.

Copy link
Contributor

@CapnBry CapnBry commented Jan 17, 2020

I've also been seeing this and have been halfheartedly investigating it too. When the /api/login POST happens, my remember parameter is always false regardless of the checkbox state in the UI. This goes back to UiStateViewModel.login_remember is always false too,

I don't know what the heck branch you're working on but here's the problem right here in the staging/devel branch right?

                 <input type="password" data-bind="value: login_password" class="input-block-level" placeholder="{{ _('Password')|edq }}">
                 <span class="pull-right"><small><a href="https://faq.octoprint.org/forgotten-password" id="login-forgotpassword" target="_blank" tabindex="-1">{{ _('Forgot password?') }}</a></small></span>
                 <label class="checkbox">
-                    <input type="checkbox" data-bind="value: login_remember"> {{ _('Remember me') }}
+                    <input type="checkbox" data-bind="checked: login_remember"> {{ _('Remember me') }}
                 </label>
                 <button class="btn btn-block btn-large btn-primary" type="submit" data-bind="click: login">{{ _('Log in') }}</button>
             </form>
foosel added a commit that referenced this issue Jan 17, 2020
Closes #3426
@foosel

This comment has been minimized.

Copy link
Owner Author

@foosel foosel commented Jan 17, 2020

Well... and then @CapnBry comes along and just serves me the solution on a silver platter. I owe you a beer, maybe at MRRF? :)

Fix is pushed and ready for 1.4.0rc4 👍

@ChrisHeerschap

This comment has been minimized.

Copy link

@ChrisHeerschap ChrisHeerschap commented Jan 17, 2020

@CapnBry's version of "half-heardedly investigating" appears to be far more effective than mine. Thank you!

@CapnBry

This comment has been minimized.

Copy link
Contributor

@CapnBry CapnBry commented Jan 17, 2020

I have to admit that when I started typing my response I didn't think I was going to be able to figure it out as I got lost in the hierarchy of javascript classes but Chrome's dev tools saved the day. That and Gina explaining the technicalities behind why it it would seem to work some of the time and all the time for some people. Team effort!

@foosel

This comment has been minimized.

Copy link
Owner Author

@foosel foosel commented Jan 28, 2020

1.4.0rc4 is out

@foosel foosel closed this Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.