Access denied when permission of app to my application is denied with Facebook authentication in asp.net core


Hello. 

I have created an app at Facebook developer  is built in asp.net core . I have a client set up to be authorized with that IdentityServer.
Now when i try to access a secure resource on client application, identity server redirects me to my identityserver website. There i try to authenticate via Facebook . After logging in, Facebook  asks for the persmission that my identityserver needs to access . If i allow there, it all works fine .
But the issue arises when i click deny, then Facebook  app redirects to my identity server website with error="access_denied" in querystring and my identityserver website throws exception
regarding that access denied error.

How can I handle that situation given the fact that I do not allow the application to access information at Faceboook? Thanks.


Asked by:- LuneAgile
0
: 3956 At:- 11/2/2018 10:42:07 AM
ASP.NET Facebook app access deny

your question is either not correct or not properly asked, as not able to understand what you want to achieve or ask. 0
By : vikas_jk - at :- 11/3/2018 9:06:47 AM
Thanks Vikas_jk I will explain more my ask. 0
By : LuneAgile - at :- 11/5/2018 3:12:31 PM






3 Answers
profileImage Answered by:- vikas_jk

Read this link details carefully, looks similar to your issue 

https://github.com/IdentityServer/IdentityServer4/issues/1087

Basically you would have to add custom C# code to handle this. 

https://developers.facebook.com/docs/facebook-login/handling-declined-permissions/

The above link may also help, related to how to handle declined permissions.

1
At:- 11/6/2018 7:08:26 AM


profileImage Answered by:- LuneAgile

When user enter the website and connected using her Facebook my app created under facebook developer ask him the permission to allow the app to recieve her informations like email adress age ... like the below picture.

when the user  deny the permission . please look at the below picture :

 

I want redirect user to page or show a notifications says that  the permission  obligatory to send her updates by email.

Thanks.

0
At:- 11/5/2018 3:30:39 PM Updated at:- 11/5/2018 3:30:53 PM


profileImage Answered by:- LuneAgile

 

Hello. Vikas_jk Thanks for your  good effort to answar me

0
At:- 11/6/2018 11:48:07 AM Updated at:- 11/6/2018 11:48:20 AM






Login/Register to answer
Or
Register directly by posting answer/details

Full Name *

Email *




By posting your answer you agree on privacy policy & terms of use