I need my user to log in only during the free time

I need my user to log in only during working hours.

Monday to Friday from 07:00 - 19:00 - Open
Saturday and Sunday - 07:00 - 13:00 - Open
Any day or time that is not available will not allow login

On login flow you check the current time and compare it to these, if it passes; it continues, if the current time is not between these times, it will not continue.

but the user can bypass there system’s current time, so you need to check it using the API call to a 3rd party time service provider like https://worldtimeapi.org/.

can do it for you for free, if you didn’t got my point :wink:

As I understand the task, a backend workflow can be used to check the time, there is no need for third party services… Well, on a paid plan, of course. The only thing is that you might need to take into account user’s time zone.

There’s another question: do you need to log a user off out of the allowed time frame?

Yes, if he is not allowed to access that day of the week and at that time I want him to log out, if he is not logged in the system does not allow him to log in

Then I would suggest to re-think the whole approach. It’s very dependent on particular use case, but for general UI application I don’t think that using logged-in/logged-out state is reliable.
It’s better to make clear assertion in every sensitive action, displaying “please come back tomorrow/on Monday” or something the like if the assertion fails.

You would need to do the checks anyway, just to log the user off, so there should not be a large overhead.

We just need to one backend workflow which get trigger while the user try to login, Once that workflwo trigger it check the time from server side, and return a state either allowed or not.

but when you use return data from API workflow you need to call it with API Connector, very easily. I can build it for you :wink:

Thank you very much, can you create a test page that I can view and learn how to implement in the app I’m creating? I’m a beginner and I really want to learn.

As it needs backend workflow access, if you give me access to your app I can do it. sorry for the late reply, as my city was flooded, we had no electricity.