Coder Social home page Coder Social logo

Comments (5)

winterscoding avatar winterscoding commented on July 23, 2024 3

I had this exception - but it was masking the real error returned by the API.

I changed the error handling code to look like this, using some RegEx to strip out the non-displayable characters:

    // Handle sign-in errors differently than generic errors.
    private Task RemoteFailure(FailureContext context)
    {
        context.HandleResponse();
        var message = Regex.Replace(context.Failure.Message, @"[^\u001F-\u007F]+", string.Empty);
        context.Response.Redirect("/Home/Error?message=" + message);
        return Task.FromResult(0);
    }

It turned out (in my case) that the real error had been:

Message contains error: 'unauthorized_client', error_description: 'AADSTS70001: Application '[GUID]' is not supported for this API version.

from active-directory-b2c-dotnetcore-webapp.

zemien avatar zemien commented on July 23, 2024

Some further testing: After the exception occurs, I tried navigating directly to http://localhost:5000/Session/EditProfile and it pops up with the Edit Profile page with my user details populated. I click Continue and I return to the app as the fully authenticated user. No exception.

from active-directory-b2c-dotnetcore-webapp.

parakhj avatar parakhj commented on July 23, 2024

This post indicates it may have to do with you calling an http url. Perhaps try the https version?

from active-directory-b2c-dotnetcore-webapp.

parakhj avatar parakhj commented on July 23, 2024

AADSTS70001 The STS means you are hitting the Azure AD endpoint, not Azure AD B2C. Is that intended?

from active-directory-b2c-dotnetcore-webapp.

jmprieur avatar jmprieur commented on July 23, 2024

Closing this issue as this sample is being archived and replaced by a newer ASP.NET Core 3.1 sample.
See Readme.md

from active-directory-b2c-dotnetcore-webapp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.