How can I set the view name in the logout URL?

Hi,

Am building an app for our customers, who log in using any email provider, but need to verify their mobile number in a view called EnterAccess. The unique link we share with every customer looks like this:

https://www.appsheet.com/startXXXX-XXXX-XXXX?platform=desktop#view=EnterAccess&row=YYYYYYYYY

However, if a customer logs out using the native logout button, the logout URL, looks like this:

Note the “view=Home”. Is there a way to set this to EnterAccess instead of Home? Note that the starting view in the App settings is already set to EnterAccess.

Would appreciate any assistance.

1 Like

I would guess the view there (Home, in your case) is determined by the Starting view setting:

2 Likes

Hello Steve,

Thank you for your prompt response. The starting view is already set to EnterAccess. That was the first thing I checked. After trying a few other things, I realised that the View value in the logout URL gets set to the last view on screen when the user logged out.

Any way of changing this? If not, any thoughts on how I can force to user to go to EnterAccess every time there is a log in?

1 Like

I’m not aware of a way.

2 Likes

I’m curious why you are attempting to do this on every login? Maybe there is a better approach!

1 Like

Well, it is not possible to collect email addresses for every customer of ours. Therefore, we’ve arrived at a workaround that:

  1. generates a unique link for each customer, and
  2. requires the customer to validate their number upon login (this is the EnterAccess view).

However, if a customer logs back in using the logout URL, there is a possibility that they get to bypass the validation view.

1 Like

Yikes! Unsecure!

2 Likes

Is this a Public app or a secured app?

You mentioned “who log in using any email provider,” which on the surface suggests you are using one of the secured app settings …see image

If you ARE using one of the secured app options, then you ALREADY have access the users’ email address using the USEREMAIL() function. This is populated when they login.

If you’re goal is to capture ADDITIONAL information about that user, then you can have, as your Start View, a registration screen where the user provides their additional details which you insert along with their already known email address into a users table. As they use the app, you can check against the users table when needed. There is NO NEED for a login/logout function as AppSheet handles this in conjunction with the authentication provider.

On the other hand, maybe you are using a Public app to try to avoid the cost of a secured app? First, understand that there is no way to build a secured app in this manner. If you have ANY sensitive data that absolutely cannot get into unauthorized users hands, you do not want to build your app this way.

Based on this comment…

….you are concerned about unauthorized access. The best you can do in AppSheet with a Public app is to simulate a login process, very poorly as you are finding out, but it would never be 100% secure and the data would be at risk.

There is one other option I am aware of. You can create your OWN native mobile app that includes a login service and then HOSTS the AppSheet app. It would likely be cheaper than an AppSheet secured app in the long run, but there are other costs and challenges with this approach.

I hope this helps!

4 Likes

It will not be secure at all, it will merely have the appearance of being secure.

2 Likes

Guess I needed to be clearer.

User logs in first and then goes through the phone authentication.

Regards,

  • Arijit

Yes, this you can control. Using a flag column, you can hide all views except the phone authentication view forcing the user to interact with it first. Once they Save on that form view, flip the flag and this view hides while all the other views are displayed.

The challenge will be WHEN to RESET the flag. You cannot force a user to logout and most users just leave the app open. If you have a Clock In/Clock Out feature or something similar, you could use that to reset the flag.

Alternatively, if your users typically use the app during certain hours, you could run a Scheduled automation to reset the flag during non-usage periods. NOTE: by just resetting the flag, the views are NOT automatically flipped. When a user starts using the app th next day they WILL see the view they left off with. But as soon as they do anything, navigate or tap a button, the views will reset at that moment based on the flag resetting. Not ideal but can accomplish the goal of someone “reauthenticating” their phone daily.

I hope this helps!!

2 Likes