[Announcement] Facebook 3.0.1 and lower no longer work
See original GitHub issueFacebook as deprecated their old OAuth endpoints that were used by Katana 3.0.1 and lower. Here’s a Fiddler trace of a failing auth flow:
# Result Protocol Host URL Body Caching Content-Type Process Comments Custom
1191 302 HTTPS localhost:44318 /Account/ExternalLogin 0 private chrome:16236
1202 302 HTTPS www.facebook.com /dialog/oauth?response_type=code&client_id=569522623154478&redirect_uri=https%3A%2F%2Flocalhost%3A44318%2Fsignin-facebook&scope=&state=gQ2fRAt8BI46eC52Z_YdSFMCYbBleCGJO5Jl1BO4yQQFl0dVjx-Z0EqMS6QGNfIHD6n7fApnqdodg6ea4E7Ky9rsnExnoW22a7mV7uYAnj089d3yKm6TN4F2YoFgeVPZPakdddB_D-b8988omDTjeQPHrfSVNFqqATAsvab15PHkSaCuk5OqWZRJUnkKtfanM2uA9E8PH4_JrNrLc4DZyd0tRfGr0C3aHUkPJMUiEq0 0 private, no-cache, no-store, must-revalidate; Expires: Sat, 01 Jan 2000 00:00:00 GMT text/html chrome:16236
1203 302 HTTPS localhost:44318 /signin-facebook?code=AQDQ5k6PZ623JZqcDBHkeK6-uryTkyuKZWGD5Hk_rcLV2sYArbQKJE-d-WIvHGikif_5VtclZojZUInsOmV_KEYUYD9jL3Gn0qKKzdk6574_Ya8IoAVPpvm9hsHZ50bKAxItn01fTW54hhGRxUFpX4yCLqXrLtVgImctDxM73XGTEq7poHN7nglEcU0TjFKImpc4Pu-FkkrQXoDGrD4Xeig4NCJHzvJcw8Oc8iJIBCJDSESi6Y2U5Y2Gsy4WntIkRnhCPqh3p--h_2LFqbRcjpx9KYrvPqhW9sr5eShwY1JJ8fVlKzBQmmQbgf0IvTcbckLnxJOPCsIyIFCs5xNf9AH4&state=gQ2fRAt8BI46eC52Z_YdSFMCYbBleCGJO5Jl1BO4yQQFl0dVjx-Z0EqMS6QGNfIHD6n7fApnqdodg6ea4E7Ky9rsnExnoW22a7mV7uYAnj089d3yKm6TN4F2YoFgeVPZPakdddB_D-b8988omDTjeQPHrfSVNFqqATAsvab15PHkSaCuk5OqWZRJUnkKtfanM2uA9E8PH4_JrNrLc4DZyd0tRfGr0C3aHUkPJMUiEq0 0 chrome:16236
1205 200 HTTPS graph.facebook.com /oauth/access_token?grant_type=authorization_code&code=AQDQ5k6PZ623JZqcDBHkeK6-uryTkyuKZWGD5Hk_rcLV2sYArbQKJE-d-WIvHGikif_5VtclZojZUInsOmV_KEYUYD9jL3Gn0qKKzdk6574_Ya8IoAVPpvm9hsHZ50bKAxItn01fTW54hhGRxUFpX4yCLqXrLtVgImctDxM73XGTEq7poHN7nglEcU0TjFKImpc4Pu-FkkrQXoDGrD4Xeig4NCJHzvJcw8Oc8iJIBCJDSESi6Y2U5Y2Gsy4WntIkRnhCPqh3p--h_2LFqbRcjpx9KYrvPqhW9sr5eShwY1JJ8fVlKzBQmmQbgf0IvTcbckLnxJOPCsIyIFCs5xNf9AH4&redirect_uri=https%3A%2F%2Flocalhost%3A44318%2Fsignin-facebook&client_id=xxxxx&client_secret=xxxxxxxx 251 private, no-cache, no-store, must-revalidate; Expires: Sat, 01 Jan 2000 00:00:00 GMT application/json; charset=UTF-8 iisexpress:1144
1206 302 HTTPS localhost:44318 /Account/ExternalLoginCallback?error=access_denied 442 private text/html; charset=utf-8 chrome:16236
1207 200 HTTPS localhost:44318 /Account/Login 2,134 private text/html; charset=utf-8 chrome:16236
Note the /Account/ExternalLoginCallback?error=access_denied request.
If you enable logging here’s the message (caused by a change in Facebook’s response format): https://github.com/aspnet/AspNetKatana/wiki/Debugging#logging
Microsoft.Owin.Security.Facebook.FacebookAuthenticationMiddleware Error: 0 : Authentication failed
System.ArgumentNullException: Value cannot be null.
Parameter name: stringToEscape
at System.Uri.EscapeDataString(String stringToEscape)
at Microsoft.Owin.Security.Facebook.FacebookAuthenticationHandler.<AuthenticateCoreAsync>d__0.MoveNext()
ProcessId=1144
DateTime=2017-03-27T20:53:38.6034000Z
This has been fixed in Katana 3.1.0-RC1 which is now available on nuget.org.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:16
- Comments:78 (26 by maintainers)
Top Results From Across the Web
v3.0 - Graph API - Documentation - Meta for Developers
Public Mode — Apps in public mode no longer allow their admins, developers, or testers to access permissions or features that normally require...
Read more >Facebook App: localhost no longer works as app domain
I've been writing a game for Facebook using Rails and jQuery. Since I started using the Facebook Javascript SDK, using localhost as an...
Read more >OpenSSL Issues Update to Fix Formerly 'Critical' ...
A quick look at what you need to know about the latest OpenSSL vulnerability (CVE-2022-3602) announced Nov. 1, 2022 and how to mitigate...
Read more >Why does the Facebook app consume so much space ...
Facebook has designed its app so that whenever you open a webpage posted by a friend on the Facebook app, it will cache...
Read more >Bug - Can't log into Unity Hub 3.0.0 on windows
Upgraded to Hub 3.0 this morning (due to prompt) and can no longer login. Tested on Windows 10 & Brave Browser (Ad-block disabled...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay folks, here is a configuration that works for me. The authentication itself works with minimal configuration. To retrieve specific fields, I still needed to use the
FacebookAuthenticationProvider
- otherwise the claims were not added and named properly.With this configuration you can get and read from the user info like this:
@Andrei, you can get the updated version at https://www.nuget.org/packages/Microsoft.Owin.Security.Facebook/3.1.0-rc1, or go to Tools > nuget package manager > manage packets for solution, click on “updates” and check “include prerelease”.
Cheers