My application is about getting the contact information of the user when filing an job application. I want for the user to have the ability to save what he/she initially filled up and when he/she wants to finish filling-up the form the information he/she already filled up will there. Is there a way to save the state of the application so that when the user closes the application or navigate to another page the form that the user filled-up wont be gone?
Depending on the number and types of fields of your application I would use Preferences.
https://learn.microsoft.com/en-us/xamarin/essentials/preferences?tabs=ios
I am having difficulty with logging in and the functionality of the back and forward buttons associated with a user who is logged in. When I log into the application from the login page I am directed to a page (lets call it logged_home). If I press the back button I am returned to the login page. If I then press forward I am redirected to the "logged_home" page. The desired outcome when pressing the forward button at this point would be that the logged session is destroyed and if the person presses the forward button it remains or redirects back to itself i.e. login.
I have tried a number of approaches including clearing cache and destroying the session but havent found a workable approach as yet. In detail I have tried to instigate a session destroy every time the login page is loaded but it doesnt seem to work as intended. Any guidance would be appreciated.
How can one avoid to have to show this redirect_uri = "https://www.facebook.com/connect/login_success.html" each time you login with your WP7 app.
I have a share button in my app which should post content to the facebook page of the user that logged in. Currently when a user already has entered username/password they still get to see the white screen "login_success.html" first and then the item gets posted and it returns back to the app page.
How can you avoid this screen in the app flow ?
I am using the facebook sdk C# v6...
Thanks.
You can make your browser control invisible after you got the access tokens
I have a link on a page that requires user login to access. I've setup Spring Security so that the user is redirected to the login page (if not logged in), and after successful login is redirected to the required screen.
All well and good. But the user wants the new screen to show in a new window, so I can add target="_blank" on the link in the original jsp page, which will cause both the login and new screen to appear in the new window.
However, now the user wants the Login screen (if user not logged in) to show in the original window, and the new screen to show in a new window. This can, of course, be done with javascript, but is there any way for Spring to redirect the view to a new window?
Whether a page response from a server opens in a new browser window, or if a redirect opens in a new window is ultimately determined by client side behavior.
Even if such functionality existed in Spring, it would ultimately be an abstraction of Javascript.
No, it's impossible. The server-side doesn't know anything about the browser windows, and is unable to control them. You may only handle this at client side.
I am writing my first FireFox extension and I have some questions. Maybe someone can help.
I have a website which requires login. The sign-in is one user per login type. So if I am logged with the username "tom" from one PC and go to other PC and try to login with the same details, it fails. When I click the log-out button from my authenticated page, the new location executes a PHP function to log-out the user (updates the "logged" status of the user in MySQL). The problem is that if a user is logged in from his work desk and surfing the page then suddenly he gets a call by a friend to quickly grab lunch in his break and has to meet him in short time, he just clicks the X (close) button from Firefox, forgetting to press the log-out button so the status of the logged is still 1. Later on, if he wants to access the page again from home, he won't be able to log in.
So, I need to grab the "close" event from firefox somehow. I am thinking about looking for the ones that contain the "website.com" domain only. Then, if a tab is closed or the main window of Firefox is closed, send an unique key, and the username to that URL that logs out the user and the problem may be solved. I don't know if this is possible. Please post any idea (followed by code if you can) for this extension to be built.
Thank you.
By design, this is wrong.
If a user's PC crashes (harddisk failure, power failure) your plugin won't be able to log out the user. And so, the user won't be able to login on any PC.
--
Let's revisit the premise,
a. why does logging in from another PC need to fail?
b. How about invalidating the login from the previous PC (log out) when the user logs in to another PC. THis is kind of like how chat applications like Yahoo! Messenger work.
From your answers, here's what i would suggest: if the user is logged in on another PC, warn and present the user with options:
cancel logging in
forcibly log out the other user and proceed to logging in
Logging the user out after a certain time of inactivity is the (application or web) server's responsibility, not (only) the client-browser's. This is called a session timeout.
You might be able to avoid the timeout by a browser implementation as you describe it, but this should not be the primary solution.
Here's an off hand approach you might take:
In your case I would include a timestamp in the table where the 'locked' state is stored. Every time a user does an action that timestamp is updated. When you try to login again ad the timestamp is older that a certain threshold (e.g. 15min) your login code should silently logout the previous user.
In order to receive a notice about the tab being closed, you'll want to do something like this sample code. However, instead of listening for load, you'll want to listen for unload.
When you do end up getting notified about unload, you'll have to do a request to the logout page just like the web application does. You can figure out what the location of the document that is unloading is by checking aEvent.originalTarget.location.href. Note that aEvent.originalTarget will give you the document object of the tab that is closing. You'll then want to use an XLMHttpRequest for this in your event handler.
You could use ajax that would ping a page on the site - all the session info will be passed and you can verify that the user still has an active browser/page open. If Firefox crashes it won't be able to ping the website anymore and the session could time-out after 15 minutes. I think that allowing a forced logout on another sign-in would be best. Usually when I leave work at the end of the day I wouldn't close all the programs or logout or anything - just lock my computer to prevent anyone from using it. Next morning I come back with all my programs still running so I can continue where I left off.
BTW, Yahoo Web messenger probably uses some form of session-based cookies. That is, cookies are stored in memory and are gone when the tab or browser are closed.
Just enable to the user to re-login from another machine. And if you get a request from the user on first machine, ask him to re-login too. So you get a single logged in user at a time.