Coder Social home page Coder Social logo

Error with Auth0 about headway HOT 4 CLOSED

VR-Architect avatar VR-Architect commented on June 12, 2024
Error with Auth0

from headway.

Comments (4)

grantcolley avatar grantcolley commented on June 12, 2024

@VR-Architect The good thing is the issue is isolated to the WASM. If you haven't already checked the Auth0 logs, it may be worth seeing if they reveal anything useful.

from headway.

grantcolley avatar grantcolley commented on June 12, 2024

@VR-Architect have you managed to get authentication for the WASM working?

Somebody posted a similar error on an Auth0 blog here, and the recommendation is basically check the Auth0 setup / WASM configuration. The poster doesn't appear to report back with their solution but I notice a couple of replies to the original post where others users experienced a similar issue and appeared to find different ways around it.

I tried messing around with my own Auth0 setup / WASM configuration but unfortunately I couldn't recreate it.

from headway.

VR-Architect avatar VR-Architect commented on June 12, 2024

I found an error on the Blazor Server which may be the root cause of the WASM also. I am not getting the email address in the claims from Auth0 which is causing the API to crash on start of debug. The claims I do get back show a scope of profile but not email. I agree with your assessment that I must have something not configured right in Auth0. Still looking. Thanks

from headway.

grantcolley avatar grantcolley commented on June 12, 2024

The readme was missing the following step which I have now added.

Auth0 needs an Auth Pipeline Rule to return the email and role as a claim. I have added this to the readme.

function (user, context, callback) {
 	const accessTokenClaims = context.accessToken || {};
	const idTokenClaims = context.idToken || {};
  const assignedRoles = (context.authorization || {}).roles;
  accessTokenClaims['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress'] = user.email;
  accessTokenClaims['http://schemas.microsoft.com/ws/2008/06/identity/claims/role'] = assignedRoles;
  idTokenClaims['http://schemas.microsoft.com/ws/2008/06/identity/claims/role'] = assignedRoles;
  return callback(null, user, context);
}

from headway.

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.