Simple PIN to access app

I am creating an app to use in the classroom and I was hoping to make a very simple log-in screen where users would just need to know a 4 digit PIN to get access to the app. They don’t need to create a PIN or reset a PIN or anything, just enter in a 4 digit code, and if they have the right number they get access to the next page, and if not they get an error sentence or something. Thanks in advance for any help. :slight_smile:

This is such a simple thing to do that I’m not sure you’ve read the tutorials or documentation.

Create a screen so when the app starts for the first time you have to set a PIN. You should be the first ever user so you get to set the PIN. Store the PIN in Local Storage.

Create another screen when the app start on subsequent occasions it asks for the PIN. Once it’s typed in compare it to Local Storage and if it’s right the user accesses it.

You can create a second PIN as well, one which only you know, and which will allow you to reset the PIN the users have.

Thank you for replying. Could you maybe point me to an example that does this I could look at in the community or something to remix? I’ll have a better chance of wrapping my head around the idea if I have something to look at. Thank you in advance.

To be honest I don’t have any examples, I don’t even use Thunkable X. What I told you is from a quick glance at the documents to see what they call the internal database. The rest was my own “problem solving”.

You may want to use the Firebase tool if you want people to access the app with the pin directly without having to enter the pin each time they open the app for the first time. Then, add a textbox, and compare the text they enter with the one in the firebase, if it matches, they get to the next screen, if not, it says pin incorrect. As simple as that.

Hey @ryan.higley.artistqu - did you ever find a solution for this?

Here’s a tutorial we did up recently that should work for you. (feel free to replace my 2 digit pin with a 4 digit one! :joy: )

cc. @Dean_Artis @AcrobatEpee

You can use a barcode instead. Choose a barcode and copy the code that appears. Paste that code in the app like this:

if value = (your pasted text)

do navigate to screen2

else

from label1 set visible to true
from label1 set text to “Invalid barcode”

It can be done so with this tool.

How was that method?

  • Very good
  • Good
  • In the middle
  • Needs improvement
  • Bad

0 voters