Email prefix as username for oauth2 application

Hello Auth0 community! Newbie here.

I set up an application in auth0 (insided), using oauth2 for our SSO.
I feel we’re really close to making this work. When I test authentication I’m passing along my email address, password, etc.
In fact, Auth0 is telling me success login, success exchange. However the application itself is telling me authorization failure.

When I look at my success login–>history–>raw json, I see that username = my email address
However, this application needs my username to be my email prefix.

How do I pass that email prefix along? I am thinking in the Auth0 application settings I need to use app metadata? I do not want users to be able to modify this.

Thank you all in advance.

You can probably use a rule for injecting that email prefix into the jwt before it is issued. You can also get access to the app and user metadata from the rule. I wrote a blog post showing that

1 Like

Thanks for sharing that with the rest of community!