0

I'm trying to access my Table in Azure App Service when user has an authentication. I use server side auth with Facebook. Once the user authenticated, the token was saved into my Setting class, as this post do. Whenever the user come back to App, I want user use their cached token to connect to the table in Azure App Service. How is the best approach to achieve this?

hamdanjz4
  • 315
  • 1
  • 3
  • 11

1 Answers1

1

1) Implement client-side authentication with the Facebook SDK. The token provides by Facebook is long-lived (something like 60 days), so you can store it in a private store. I cover private stores in chapter 2 of the ZUMO Book at http://aka.ms/zumobook

2) When you open the app, use the stored token to get a ZUMO token. This is short lived - 1 hour. You can store this too, but it's a waste of time since you can use the unexpired Facebook token to get a new one.

3) Implement an Authentication Refresh process via a delegating handler - I describe that in the ZUMO book too.

You still need to configure Azure App Service Authentication to understand and validate your facebook token (also covered in the book!)

Adrian Hall
  • 7,990
  • 1
  • 18
  • 26
  • Yeah, I just read your book. It's great. I only use FB server side auth, because I couldn't find any supported SDK for UWP. Is there any?. It's work great in Android though. Anyway, your book has lead me to the right path. Thank you – hamdanjz4 Apr 17 '17 at 04:34
  • See http://stackoverflow.com/questions/24105390/how-to-login-to-facebook-in-xamarin-forms – Adrian Hall Apr 17 '17 at 15:04