Comments (2)
Or is it an issue with the base OAuth Provider? (quickly! RC2 is imminent ;)
Yep, though it's actually by-design: RemoteAuthenticationHandler
and OAuthHandler
(the classes that handle the callback path dance) don't consider access_denied
as a special error and simply return a 500 response to indicate that the external authentication process failed.
In RC2, the handler no longer returns a 500 response but directly throws an exception. If the exception is not caught by one of the middleware registered before the social provider, the server is responsible of intercepting it and returning a 500 response.
To stop using the default logic (which is... well; not super user-friendly 😄), the recommended approach is to use the RemoteError
event to redirect the user agent to an error page.
app.UseBattleNetAuthentication(options => {
options.SaveTokensAsClaims = true;
options.Scope.Add("wow.profile");
options.ClientSecret = Configuration["xxxxxxxxx:BattleNet:Secret"];
options.ClientId = Configuration["xxxxxxxxx:BattleNet:Key"];
options.Events = new OAuthEvents {
OnRemoteError = context => {
context.Response.Redirect("/oauth-error-page");
context.HandleResponse();
return Task.FromResult(0);
}
};
});
That said, I agree the default experience sucks. I'm pretty sure we had plans to introduce an AccessDeniedPath
property, but I can't find the corresponding work item.
I'll move your ticket to the aspnet/Security repository.
from aspnet.security.oauth.providers.
Moved to aspnet/Security#710.
from aspnet.security.oauth.providers.
Related Issues (20)
- MyGet.org is down HOT 6
- Update AspNet.Security.OAuth.LinkedIn to work with Sign In with LinkedIn using OpenID Connect HOT 2
- Weixin use qrcode login HOT 2
- Unable to retrieve OpenID configuration for Apple HOT 11
- how to implement external login provders(linkedin) login using .net core with openidconnect? HOT 1
- Twitter v2: The oauth state was missing or invalid. HOT 6
- X/Twitter v2 iPhone Browser Interception Issue: Correlation failed. HOT 7
- Cannot register all BattleNet Provider Regions at the same time. HOT 5
- Okta Provider not respecting Options settings HOT 3
- Multiple tenants for Okta at runtime HOT 3
- Unable to obtain authorization during callback after logging in using QQ HOT 3
- Angular client HOT 2
- I could not authenticate by Linkedin when I redirected to redirect_url after confirm linkedin page authentication HOT 2
- Add Atlassian Provider
- How do I update Claims (Discord provider)? HOT 1
- Where to place logic adding additional claims obtained via an alternate REST endpoint HOT 1
- Sign in with Apple returns 'invalid_client' error for the first try HOT 4
- LinkedIn Authentication Fails HOT 2
- QuickBooks. Doesn't contain Sandbox settings. HOT 3
- Neither first name nor last name populated in claims principle by Apple provider HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aspnet.security.oauth.providers.