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

Add a "Remember ..." checkbox to the LoginDialog #2305

Closed
manekovskiy opened this issue Jan 8, 2016 · 4 comments
Closed

Add a "Remember ..." checkbox to the LoginDialog #2305

manekovskiy opened this issue Jan 8, 2016 · 4 comments

Comments

@manekovskiy
Copy link
Contributor

It would be nice to have a checkbox on LoginDialog. From my experience there are a lot of cases when users want to save their username or both username and password.

checkbox-on-login-dialog

The checkbox text and visibility should be configurable in the same way as for example AffirmativeButton and NegativeButton. And the LoginDialogData will be extended with a new flag property indicating whether checkbox is checked or not.

I'm definitely going to implement this feature in my fork so if you are interested I'll send a pull request once it is ready.

@bigworld12
Copy link
Contributor

bigworld12 commented Jan 8, 2016 via email

@michaelmairegger
Copy link
Contributor

Agree 👍

But then we have to store some information into the application settings. Each logon dialog must have an ID that identifies the dialogue, whether it should be opened or not---depending on the selection.

@manekovskiy
Copy link
Contributor Author

@xxMUROxx When we need to access anything that requires authentication we typically have some abstractions like "Authenticator" and "CredentialsStore". Authenticator can either ask CredentialsStore for saved credentials or start the authentication process from the very beginning which involves collecting a username/password using the LoginDialog.
And CredentialsStore knows how to save/retrieve credentials, it is a way to abstract out the place where credentials live between user sessions.

When I'm trying to imagine interactions between this Authenticator/CredentialsStore pair I cannot see "credentials identifier" as a part of LoginDialog, it would be more practical to have it as a part of Authenticator implementation since he is the guy who talks with CredentialsStore.

@thoemmi
Copy link
Collaborator

thoemmi commented Jan 10, 2016

@xxMUROxx why should the settings be stored by MahApps.Metro? Username and password aren't stored either. It's up to the application (or business logic respectively) to both provide the login dialog with a LoginDialogSettings instance and to process its returned LoginDialogData. MahApps.Metro is meant for the presentation layer only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants