Azure facebook login on localhost - facebook

For my cordova application i am running a Azure .net backend.
To access it from the client i use the mobile service client plugin for cordova.
Now to my problem:
I want to allow a facebook login which is already supported by the mobile service client. Therefore i registered a FB-application as described in the azure tutorial
Everything works well when i access the published backend. However if i am running it locally, the facebook login fails without any helpful error message.
It must be a problem with the facebook app settings.
For the case where i am running on localhost, i created a second testapplication with the following settings:
For the valid oAuth redirect URIs i have tried different things.
Does anyone have an idea how i could solve this?fa

Related

Cant test FB SDK login locally even though I have set my domain and site URL (app is test mode)

I am developing a web app with Facebook integration and I can't figure out why I can't test the login function locally. I have looked through the answers here (How to Test Facebook Connect Locally) and have tried to follow the steps of having the app in test mode, setting the site URL and the domain.
Based on FBs documentation here: https://developers.facebook.com/blog/post/2018/06/08/enforce-https-facebook-login/
I should be able to use http for localhost development, but I get the error
The method FB.api can no longer be called from http pages. https://developers.facebook.com/blog/post/2018/06/08/enforce-https-facebook-login/
and can't log in. Below are pictures of my app settings (including an indication it is an app in 'test mode').
So this is really only a half answer, but it seemed easier for me to just force https for my local development using mkcert (https://github.com/FiloSottile/mkcert). After creating local certs I updated my site URL to say https://localhost:8080 and I am able to log in without issue.

IBM Cloud AppID with w3ID: Redirect URI 500 error with CloudFoundry application

I've had this issue for weeks and still can't find any way to solve.
I've built a node.js application that is built upon the sample that is provided when setting up CloudFoundry.
My application is connected to AppID and uses IBMid authentication. My redirect URI is registered in my application code, in the AppID console and also registered with IBM IT security.
However when I navigate to my application, I am able to sign in with IBMid but then I get a 500 error for my redirect uri:
I haven't been able to find a solution to the problem, nor are the Cloud Foundry and AppID documents helping.
Any guidance would be much appreciated!

Using AzureAD secured application as a Personal App can't show login.microsoftonline.com in iFrame - does work in Developer Mode

I've created a webapplication, hosted in an Azure App Service. The App Service is secured using Azure AD Authentication with login required.
When trying to load this page in a Personal App, the page tries to redirect to login.microsoftonline.com which is not able to show the page in an iFrame.
When switched to Developer preview the application is shown, passing the login using the currently signed in user.
Is there an ETA on enabling this behavior on the "non-developer preview" client?
Or is there another way to achieve this?
PS: I'm aware of the SSO javascript API, but this does require anonymous access to the application executing the JS calls. Unless I'm missing something? :)

Unable to Publish .Net backend Service Project into Mobile App service

I have recently migrated my .NET backend Mobile service to App Service, then I tried to publish the updated Service Project to the App Service but it is failing and getting an error saying
Severity Code Description Project File Line Suppression State
Error Web deployment task failed. (Connected to the remote computer ("******.publish.azurewebsites.windows.net") using the Web Management Service, but could not authorize. Make sure that you are using the correct user name and password, that the site you are connecting to exists, and that the credentials represent a user who has permissions to access the site. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_UNAUTHORIZED.)
I have downloaded the Publish Profile from the portal Mobile app command Get Publish Profile option.
Then I imported it to my service project under publish wizard using Import option, I got two profiles one is FTP another one is Web Deploy I tried both option but no luck.
According to the error message it is saying UNAUTHORIZED so, where can I get/see the user name and password of my Mobile App in Azure Portal?
Thanks,
Narendra Macha.
This is a known issue for which a fix is in progress. You can workaround this by adjusting the publish settings to use the scm endpoint for your site, as captured here.

New session on every page view when running Facebook application in IFrame in IE and Azure

I am developing a Facebook application and I am using Facebook C# SDK v4.2.1 to help with authentication. I am building the application using ASP.NET MVC 2 and am hosting it in Windows Azure (SDK v1.2).
Everything has been running fine when I had my application in a full browser window, but now when I am attempting to IFrame it in Facebook, I run into session problems. The behavior is that a new session is created on every new page request so the user always comes back to the application's login page. I can see that that Facebook session is valid when Facebook redirects back to the application after authorization, but when I set some session variables and redirect to another page, the session is gone.
When I debug the application locally, both as a standalone web application and in the Development Fabric, everything works fine. It is only when it's published to Azure that I get the problems. I have tried to have a local debug environment that is very similar to production where I have the facebook application at apps.facebook.com/myappnamedev that points to localhost on a specific port.
I just now also discovered that I only see the problem in IE (I am using v.8). Firefox v3.6 and Safari v.5 works fine.
Any ideas to help my troubleshooting? I have spent 10 hours on it and it's getting really frustrating... I am happy to paste code/configuration info if needed, just let me know.
Thank you in advance!
// Peter
I solved this. The redirect from Facebook after authentication landed on different pages in my development environment compared when deployed to Azure. I moved my authentication logic to global.asax instead.