Getting Facebook permissions in Google Action - node.js

I am currently building a Google Assistant App/ Action using API.AI and node.js. My application needs to get permissions from the user, to get his Facebook likes and make FB Graph API calls from node.js. How can I do that? Do I need to build an android/ ios app for that?

You will need to implement account linking. However, you will not be able to use the Facebook OAuth directly but have to implement your own OAuth server. Your service will independently need to get the user to provide the Facebook OAuth credentials so you can use their API.

Related

Google Calendar API FreeBusy External Users

Is it possible to use oauth2 to access the Google calendar of several Google account users external from any user running my app? Can I run the free-busy API call to find out when the external users are available? If possible, do all external users in this call have to be in the same organization? To identify the users, do I need their email addresses? Can I write this in Node.js to run on a server? How can I grant access to the Node.js application running the free-busy query for all the external users being queried?
You can use Google Identity services to call the API and get the necessary token to access the Google Calendar for web applications, either user "Sign-in with Google" or "One tab."
Both options can be used on Mobile devices and web applications.
You can find more information about the authentication with calendar data API in this documentation or more information about the OAuth client library for Node.js here.

Authenticate calls from DevOps to third party API

Our situation:
We have a API developed in C#/ASP.Net Core together with a separate frontend. Both the API and the frontend have an associated App Registration in Azure AD and whenever the frontend wants to make a request to the backend, it uses MSAL to obtain a token with the scopes that are exposed by the APIs app registrations.
No we want to create an extension for Azure DevOps that calls our API as well, but we are struggling with how to authenticate it. The token that you can get from the SDK is lacking our scopes because it is, as far as I understand it, only really meant to be used for DevOps internal services. I've seen this sample repository, but it seems to me that it just skips verifying the scope and the token also does not contain any user information.
The way we are doing it right now is to use MSAL inside our extension iFrames. That requires the user to sign in twice and brings a few other unwanted downsides, like missing persistence.
How would/did you go about authenticating API calls in DevOps extensions?

Microsoft Bot Framework Login Authentication using BotAuth Custom Provider

I'm using the Nodejs SDK of Microsoft Bot Framework, and I'm trying to a ChatBot that has a Sign In Card in where the user will be redirected to a browser which will then require the user to login his/her account to a 3rd Party API.
I saw this GitHub repository: https://github.com/MicrosoftDX/botauth (BotAuth) which makes it possible to do a 3rd party authentication within the Chatbot using different providers such as Facebook, Dropbox, Pinterest and etc.
In my case, I need to add a custom provider which is not available in BotAuth. Is there a way to do this using BotAuth - Nodejs, or is there any available package that can help me solve this?

Servicestack facebook auth via mobile

I've read through every resource our there on the servicestack wiki, examples on github, forums and stackoverflow to figure out implementing facebook integration with a mobile app and servicestack backend. However, none of them have the answer or I'm missing something basic.
In our workflow, a user decides to Register on through the mobile app using Facebook:
We contact Facebook requesting permissions to the user's account
User grants permissions (let's not worry about denied for now)
We get a user access token and everything is good so far
Next, we want to access our ServiceStack backend (using the Facebook Auth Provider) to create an account and automatically log the user in the first time. The examples refer to the method where a web browser is used. What if I want to pass the user auth token from my mobile app to the server to fetch the user permissions and create an account if it doesn't exist and then log the user in?
The existing endpoint seems to work only for a browser app because it also does a redirect. We need a way to pass in the user auth token and log the user in (or create an account if it doesn't exist). Any idea how this can be accomplished?
To login via OAuth in Mobile Apps, you'd typically launch a browser control to have it redirect to the remote OAuth site where it gets the users permission and captures their credentials just as it would with a website.
If you're developing a Mobile App using Xamarin the TechStacksAuth shows an example on how you can use Xamarin.Auth control to authenticate with a ServiceStack back-end via OAuth.

Making Google API calls to only one user

I'm writing an in-house app and we're using some of the Google API's in Express/node.
Since I'm only going to use one google account (an email I made just for this purpose), what's the best authentication configuration to use?
It's a service account.
From the Google Developer Console create a service account for your app, the use the API key generated in your app.

Resources