Hello everyone!
I have made an app for my pet hotel. And everything is working good, but I am facing with one problem. We have severals ip cams in our hotel, and we give access to our clients, while their pets are staying in our hotel, approximately about 1-2 weeks. So I have made AirTable database with following information: Name of a cam, Image of a cam, Cam Link and a password. So when client want to see the cam, he choose a cam for data view grid
But, if he want to see another cam, he need to enter the password again.
How I can give him access for example for 15 minutes. And after the time is up, he will have to enter the password again?
Всем привет!
Вдруг мне попадаться русско говорящие пользователи)))
Опишу проблему и на русском, я сделал приложение для своего отеля для собак. Одна из функций нашего отеля, это предоставление доступа к камерам отеля, на время проживания их питомца. Примерно 1 - 2 недели. Так вот, я сделал базу данных на AirTable, в которой сохранил: имя камеры, фотография камеры, ссылка на камеру и пароль от камер. В самом приложении я сделал пункт доступ к камерам, пользователь выбирает камеру которую он хочет посмотреть, потом вводит пароль от неё и попадёт на страницу с камерой. Так вот вопрос следующий, как определить пользователя, который только что ввел успешний пароль от камеры, чтобы дать ему доступ к камерам на ближайшие 15 минут к примеру, а потом опять запросить у него пароль. Есть идеи?
Wait 900 seconds (15 minutes) before navigating to the login screen.
or
Set a stored var to “Seconds since 1970” block. Use the “Seconds since 1970” block and do a little math. if [ (Seconds since 1970) - (TimeVar) ] ≤ 900 Navigate to (LoginScreen)
What you need is a variable, named “AskForPassword?” or something and intialize it to true
Then when the user enters the password, it will set AskForPassword to false and wait 900 seconds.
When the 900 seconds are up, it will set AskForPassword to true
The last thing you need is when the screen loads up, it checks if AskForPassword is true or false.
If it’s true, it will ask for the Password.
If it’s false, it won’t show it.
Copy when LogIn Click.
Remove the else statement and the navigate to Screen Cam.
And remove the part where it sets the AskForPassword from the original code.