How to set auto login in windows 8 app - authentication

I need to keep a auto login to my windows8 app. When user login with email and password i need to store in local and next time when app opened those details need to be auto filled.
I am new to these apps so please provide some code lines
Thanks
Ak

Instead of building your own login functionality from scratch you could use the Microsoft account sign in. Have a look at this: http://msdn.microsoft.com/en-us/library/windows/apps/jj193591.aspx
and this: http://msdn.microsoft.com/en-us/library/windows/apps/xaml/Hh968445(v=win.10).aspx

Related

How can i give my developer his own login to my FB APP

I've got a developer who's working on my FB APP, how can i give him access? At this moment everything still has to be done through me.
Regards , Rene
First things first, you're going to want to log in to https://developers.facebook.com/ and select the app you want to add the developer to at the top. You need to have the developer in your friends list or have their Facebook username handy.
So click on the Roles section, and you should see a section called "Developers":
Go ahead and click "Add Developers", and you'll be able to add the developer to your app.

Office 365 JavaScript API, redirect back to WP app after launching Store

I am creating a Windows Phone app using HTML And JavaScript. I am able to add connected services and have selected "Users and Groups" and given it Read permissions.
I am then making the following calls on button click:
var authContext = new O365Auth.Context();
authContext.getIdToken("https://TestDomain.onmicrosoft.com/TestWebApi").then(
function (token){
}
);
Services/Office365/Settings.js has been edited to the following:
Settings.clientId = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
Settings.authUri = "https://login.windows.net/common/";
Settings.redirectUri = "ms-app://s-1-15-2-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx/";
I got the redirectUri value by calling the following function:
Windows.Security.Authentication.Web.WebAuthenticationBroker.getCurrentApplicationCallbackUri();
I do get the login screen for my organization and I am able to provide credentials and it tries to redirect it back to my application, but then I get asked the following question:
"You need to install an app for this task. Would you like to search for one in the Store?"
If I click on yes, it takes me to the store and says "No apps found". If I click on no, it doesn't do anything.
How could I possibly get it redirected back to my app?
The connected services experience only works in Multi-device hybrid apps (a.k.a. Cordova), not in Windows Phone apps.

How to Sign-Out from an authenticated ListDataProvider/Authenticator in Windows Phone 8

I am reading a SharePoint list from Office 365 inside a Windows Phone 8 app. My app-code is based on this sample code from Microsoft. It uses
Microsoft.SharePoint.Phone.Application.ListDataProviderBase
Microsoft.SharePoint.Client.ClientContext
Microsoft.SharePoint.Client.Authenticator
The actual problem beeing signout not working!
On the first request to the server, the client asks for authentication and shows a hosted browser window where I can enter my account credentials. I select to stay logged in here.
If i restart the app, it authenticates me without showing the UI again.
I would like to be able to switch user or simply signout leaving no credentials on the phone behind.
I found the following static methods on Authenticator which do not change anything:
Authenticator.ClearAllCookies();
Authenticator.ClearAllCredentials();
Authenticator.ClearAllApplicationSettings();
What is the prefered way to do this?
This is an example of how I am logging out a user in my SP list App for WP8:
App.MainViewModel.IsInitialized = false;
Authenticator.ClearAllCredentials();
App.MainViewModel.Initialize();
MessageBox.Show("You have been successfully logged out, click refresh to login again.");
Your app maybe a little different, but you should at least get to the App and ViewModel to set Initialized as false. I did expxect the App.MainViewModel.Initialize() to show the login page but need to click refresh after calling this SignOut method to do so, that is why I displayed the messagebox.
Hope this helps you.

Implementing "Rate application" functionality on a Windows Store app

I am trying to implement rating functionality in a Windows Store application using HTML / Javascript.
I am showing a popup dialog similar to the one below within the application and when "Rate" is clicked I would like to redirect to the Marketplace where the user can then rate the application.
This is a task that can easily be done on Windows Phone 7 via the MarketplaceReviewTask.
Is there an API on Windows 8 that I could call to have this achieved?
The Rate and Review link in the Settings charm will automatically appear for users other than yourself (since you can't rate your own app).
If you want a custom link somewhere, you can use LaunchUriAsync like Jim says, using this URI:
"ms-windows-store:REVIEW?PFN=[my-pfm]"
where my-pfm is "Package Family Name" which you will find in your application manifest.
Here's a blog post I found that's helpful:
http://www.andybeaulieu.com/Default.aspx?tabid=67&EntryID=227
If you use protocol activation (LaunchUriAsync) with the URI format suggested here you'll get to your app's page on the Store; however, there's still an additional step for the user to click Write a Review. There may be a way to deep link to it and I'll update if I find out.

Need a way to alert users when building spotify app

I'm building a spotify app that does some work in the background and should then alert the user if it finds a match. I can't find a way to notify the user on the main plane when I have found something of interest.
I'd like to have something like a counter on my app name or some form of notification in order to alert the user that something has changed in my app and that they should come to the app.
Does anyone know if this is possible ?
thanks,
Sean
You would need to notify them via Facebook, Spotify doesn't allow you to identify the individual users on the Spotify platform through the api.
Also there is the issue of that your App unloads after 60seconds of the user not being on the App Pane (off in a playlist etc).
So whilst a counter icon that you suggest would be wonderful.
The App Unload-er needs to go away first.