Design recommendations for Xamarin Forms Login scenario - xamarin

I am looking for some best practice advice. I have a mobile application that has 4 functional elements. Out of the 4 only 1 requires the user to be authenticated.
For the authentication I have built a login page. So first I am checking if an application level property is setup. If that is true then the app does not need authentication. If that is not set I am loading a login form hosted on a content page.
The login page/ form has a backing ViewModel.
The PROBLEM I am trying to solve is that after the user has logged in from the login page and navigates to the next page, the back button takes user back to the login page.
The scenario I would like is that when user reaches a specific page, from that page back should go back to another page not the login page.
MainPage --> Login --> Dashboard
Dashboard(Back) --> Login (Not desired)
Dashboard(Back) --> MainPage (Desired)
Can somebody please help with this? I am looking for some guidance.
Regards.

Related

How to avoid page refreshing when i click the back button

Am using struts2 to create login and logout functionality, when user login i will create the session for him,by using interceptor i will filter all users if they are in session or not if the session not created i will redirect the page to login........my problem is once i done logout that will redirect to the login page but when user click browser back button the page will get refreshed and again that will login ,,,,,,could anybody help me out from this problem
Thanks in advance
When you click "<-" button on browser the browser renders the page from its cache. So server does not know if you have click back button. In your case when user clicks back button, page is loaded from cache but it does not mean that session is again created for that user as logged in. When user will click on any authorized link on that page, your server side code will check that user has no valid session and login page will be returned.
Solution: However if you do not want user to get cached page then you can load a script say checkLogin.js for every page in your site. This script should be executed on load event of the pages. When user logs out, set a variable in cookie indicating that user has logged out. When user clicks back button then that script will be executed. That script will check, using the mentioned cookie variable, if user has logged out. If user had logged out then redirect to login page using javascript.
To avoid that refreshing i have redirect my page to menu after loginsuccess not forward i have escaped from that ghost problem
use like this in ur struts.xml
<result name= success" type="redirect">Menu.jsp</result>
thanks for all

controlling where registered users land on login in Joomla

I am not quite a novice yet in Joomla but I am working my way up to that level of expertise!
I have never used Joomla and I have a friend who's asked if I can help with their website.
Basically, they have a members area which registered users can access however, when a registered user logs in, they see the default home page for the website instead of the members home page which they have created specifically for the members.
What is the simplest way to redirect users on login to go to the members home page instead of the default public home page?
They currently have a menu item which is called "Member Login" which is of type "User >> Login" which has an Access level of "Public" - I have set the variable "Login Redirection URL" as follows:
I have also tried configuring the module mod_login by setting the Login Redirection Page as follows:
But neither of these have changed the login behaviour.
The Article I am redirecting to is "Members Home Page" - This page has an Access level of "Registered"
Any help would be wonderful?
Assuming that you are using Joomla 2.5, then there are parameters you can set in the menu item to determine where a user is redirected to on login and logout. You just put the appropriate URL in the field and your done.
From what you are describing, the site is most likely J1.5. The User > Login menu also has the same redirect parameters, so you can still fill those in. However, I would HIGHLY recommend upgrading the site to at least J2.5 before the site gets hacked.

Check User is Logged in or Nor in Web Browser Control

I m trying to make one test app in windows phone 7.1 And I am using webBrowser control in my app and giving url of external website. User input login details in that form and press submit button. How I Can know the user is logged in.
Thanks,
You can track the URL the user is being redirected to, using the WebBrowser.Navigating event. Check the NavigatingEventArgs.Uri property.
Then you just need to work out the page that the login page redirects to, and if the user is navigating to that then they have successfully logged in.

Code Igniter 2.0 session issue

I am having a session issue in codeigniter 2.0. The reason I think is it caching the page. Here is my problem.
I created a page and to access this page a user login is required. The login works fine. When I logout then I again redirected to login page and thats perfect. But if I click Back button of my browser then it again take me to that protected page. Technically this page is not accessible now because I have already logged out. If I put the link of that protected page in browser then it ask me to log in but after logout the browser back button is having the issue.
Can anyone please guide me with this.
Thanks
That's normal browser caching behavior. One of the way to fix that is to make sure that wherever users go from the cached page, their session will be checked, and if they've logged out in the mean time, they'll be redirected to the login screen, so no harm can be possibly done.

After login, how to send user back to the same portal page that they were on before loging in?

im using websphere portal 6.1.5 and portlet factory 7
How can i send user to a custom page intead of portal home page if user accecces a certain page before loging in?
i want to return the user to the same page that they were on before they clicked login link and went to login page. any solution?
That should be the default behaviour. If the user is redirected to the login page after login the WAS Server woudl redirect you back to that particular page.
This assumes that the URL is unique for that page because that is what is stored by the server before it does the re-direct to the login page.
Cheers
Manglu
No WebSphere by default redirects the user to the first page that he has access to right after login. In order to make portal redirect the user to a custom page you would have to implement a LoginFilter; which can be attached to the wps.war.
Take a look at:
Info Center: Configuring authentication filters
Creating loginfilter for WebSphere Portal
TechNote: New security APIs in WebSphere Portal
I hope this helps.
The default Login redirect behaviour is true, but only if the Login page is requested using the unprotected URL.
If the page is available within the protected area, meaning for authenticated users as well you can change the calculation of the redirect behaviour even without a loginfilter.
Therefore you would need to send a redirect to the current page but reference the protected area. Like wps/portal/a/b/c is the URL the user is currently visiting the login link should trigger wps/myportal/a/b/c.
WebSphere will kick in and require authentication for the user, but stores the original requested URL. This information is then reused from Portal after the user authenticated

Resources