0
votes

I am develop a new UWP app, and I want add a pin code/password after startup/splash screen. I already researched but did not find anything, what I intend is possible? If so, how?

The password to enter the application will be in my app code, that is, I just want my application to validate the password entered by the user according to the password that is "stored" in my code.

If I'm not wrong, OneDrive already had an option like that, in which you could set a password that had to be set when the app started.

1
OneDrive will cache the user credentials for the next startup and will not ask you again on a new start. That is somehow different, because you will always ask on startup?Sir Rufo
docs.microsoft.com/en-us/windows/uwp/security/… this example will helps you but it requires device already pin or password protected else it will not workShubham Sahu
Yes @SirRufo, I want that my app always ask for a pin code on startup.fernandousaaa
@ShubhamSahu in this example, where the password is define?fernandousaaa
It is using your device pin not user defined app password you can land user on a authentication page where user need to enter thier device pin for landing to main pageShubham Sahu

1 Answers

0
votes

Reading the comments I understand that you just want to keep things basic and ShubhamSahu's example is overkill.

Why don't you just let a message dialog appear at the start of your code with just a simple textbox where the user can fill in his password/pin. When the input matches with the information stored in the code, the dialog closes and you gain access to your original application.

Please find a custom-dialog-example here.

example