can Xamarin.forms automatically check for login details before launching the screen? - xaml

So in my application on launch a login screen is shown, a user enters username and password, and if they close the application without logging out when they open it again they just press login within filling in the Username and password fields and it opens, so I want to ask is there a way so my application can check for the login details (saved in php) ? and if login details are valid it skips the login screen but if login details are not valid it takes the user to the login screen. is there a way I can implement it?

Related

Check if user already logged in okta on startup of website or application. so that we don't need to login again

I have added one more button apart from regular login button, the button is sing in with okta. when clicked it challange and redirect to okta username and password after that my code execute and login. But i want to do something like if i am already login in okta and when i open my site it should directly log me in without clicking sing in with okta button. Is that possible ?

How to restore all the page information after logout using cookies on Selenium

After we click logout, the session expired and we can no longer use the store cookies to login the same user right? We are facing a situation where the same user would login to a system several times during the entire test suite, and we want to be able to restore all the page information that the user was on for various test case.
For example, User A login and navigate to page (Page-10) and then logout. After some time, User A login and navigate to page (Page-14) and then logout. Then, we want to be able to have the User A login and restore all the page information and direct the page to Page-10 without going over all the navigation process.
Or just login to an user and have all the iframes I open on the previous login. Anyone has any idea on how to do that?

Bypass user login (VB.Net)

I have this application (Windows Form App) that require user to enter their Username and Password. Inside this application, there are shortcut for website and each of the website also require user to login first before they can use the website. But I want to bypass user when they click the shortcut for the website (if they already login for the application) where the login page will skipped and redirect user to the mainpage of the website. User will only required to login if they are accessing the website without using the application.
I used Process.Start() to run the website when the website shortcut is clicked. It open the website but redirect user to the login page. How do I bypass user credentials so that they will be able to login once (through the application) and can access all the website without do login again?
Edit : Is it possible if I use session inside my website login coding to redirect user to the main page? So it's like, when user login using the application, the website will automatically detect that the user already login, so user will be redirected to the main page of the website without going through the login page.
Give your user an API key that is stored in the user database table that is unique that changes when they login. Then in VB use Process.Start("https://example.com/login.php?api_key=" + 'add api_key retrieved from database on login) then in your PHP you check for the api_key as a login that will create the session for the logged in user.

How to achieve "Remember Me" functionality for both local and remote login pages?

I have a requirement in my application for iOS and Android, developed using IBM Worklight, to remember the user ID if the user selected this option.
I can achieve this by using localStorage, but the issue is that I have two login pages:
One is placed within the application, and the
Second is hosted on a remote server
Depending on the conditions the application will meet, either the remote login page will be displayed or the local login page will be displayed.
If I use localStorage on local page it is not accessible for server side login page. So I want to use some storage/file on the mobile to store my user id which is accessible for both local and server login page. Is this is possible using worklight/phonegap storage?
More explanation:
Remote login page is hosted on some www.xxx.com domain. My requirement is on launch of application the local login page is shown to the user, there user can enter user id and password and selects remember me option and submits form. Then user logs in and navigated to some xxx.com/yyy server page. From there when user clicks on log out it navigates to remote login page which is hosted on www.xxx.com server. As user already checked remember me option in local page the remote login page has to pre populate the user id text box. And same scenario should happen when user enters credentials in remote login page and selects remember me check box. So when user kills the application from background and relaunches the application user will get local login page where I need to pre populate the user id last time he entered.
Short answer: in my opinion, no.
Longer answer: I will explain what I think using your scenario:
Remote login page is hosted on some www.xxx.com domain. My requirement
is on launch of application the local login page is shown to the user,
there user can enter user id and password and selects remember me
option and submits form.
So far so good. You can store it in either Web Storage or JSONStore or use Cordova File API. Catch: all of these are available ONLY for the specific application.
Then user logs in and navigated to some xxx.com/yyy server page. From
there when user clicks on log out it navigates to remote login page
which is hosted on www.xxx.com server. As user already checked
remember me option in local page the remote login page has to pre
populate the user id text box.
Still plausible. Lets say the user selected 'Remember Me', so you can adjust the URL pointing to the remote login page and send with it as parameters the username and password. Assuming that there will a mechanism to handle those on the remote page.
This does not come for free, though.
This is not meant to work out-of-the-box. It's worth noting that whether Web Storage (localStorage...) is used or any other type of storage- the application and the Cordova InAppBrowser do not share the same localStorage, and the same is true if you open a new WebView.
And same scenario should happen when user enters credentials in remote
login page and selects remember me check box. So when user kills the
application from background and relaunches the application user will
get local login page where I need to pre populate the user id last
time he entered.
This is also a problem IMO, because any application is sandboxed - be it the browser app or the Worklight app, each of them is sandboxed. so you can't just go to website X, and create some localStorage for it and expect that data to be available for another WebView belonging to another app. That's the whole point of sandboxing, in order to protect the app.
And in this case, where the remote "page" will save the data, only Web Storage is available anyway, as JSONStore requires the Worklight API, which is not available when you load external websites.
Notes:
Since you want to save both username and password, you'd probably want to encrypt them in some way, so JSONStore and WL.EncryptedCache are your options, rather than plain Web Storage.

How to create popup window to login with linkedin in rails 3?

I have been facing this problem that i try to login to my website using linkedin, I am unable to do the following and don't know where to start eve,
when the user clicks on "log in via linkedin",
the user should get a linkedin login page(popup)
2.Once the user enters his login credentials and clicks to login the linkedin login page must be closed and my web page must shown to the user with the values if the login credentils are correct.
Please advise me how to go about.
How do i create popup upon clicking via linkedinlogin?
Thanks, Antony