PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, July 16, 2022

[FIXED] How to integrate Facebook login into Azure Web App

 July 16, 2022     asp.net-mvc, azure, facebook-login, oauth     No comments   

Issue

I am trying to connect my Azure Web App to a Facebook login.

In the first step I use the ASP.NET MVC sample from Microsoft. The application is up & running after my deployment on all tabs.

Now I configure my authentication via the Web App settings in Azure. I have already created an application via my Facebook Developers account.

My OAuth Redirect URL is: https://<app-name>.azurewebsites.net/.auth/login/facebook/callback

The next time I open the application, the Facebook login page appears and the login works. I can access tabs in my application which are static (like home tab with text content), but I can not open tabs with functionality like "Create New".

Is it necessary to make changes to the code or is it sufficient to change the authentication configuration via the Web App settings in Azure Portal?


Solution

In the Startup.Auth.cs you need to add the following piece of code to make sure the

app.UseFacebookAuthentication(
appId: "",
appSecret: "");


Answered By - Sajeetharan
Answer Checked By - Cary Denson (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing