Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Login Pattern Questions

$
0
0

Hello everyone,

I've been creating a few App with Xamarin Forms now, and i'm still wondering about Login Pattern. Most of the applications i designed had the same logic:
The application need a simple login page for the user to login before accessing the application, no need to register because the account are created from a website so the mobile application just need to check with a webservice if the credentials are OK, then redirect the user to the main page.

To do this, i found 3 ways to do this :

  • The application start on the HomePage, then the HomePage check if the user is logged in, if he's not, the application Push a modal Login Page. If the credientials are okay, the login page Pop and the user comeback to the homepage.

  • The application start on the login page, then if the credentials are okay, the main page is replaced by the HomePage. (Or i push the HomePage and prevent to coming back if user is already logged in).

  • In the App.cs i try to do some logic to set the main page to the HomePage or LoginPage according to the user state.

These 3 ways worked but i'm still wondering what is the right way to do it. What are the standards and what you people do for your applications ?
Feel free to give me other pattern or comments about the 3 above. I'd like to know what should be done to pick one and stick to it for my further applications.

I worked only with Xamarin.Forms because most of my application are forms based.

Thanks for you answers and pardon my english :)

Armand


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>