Use Java to get email from the Callback

I have the following code to create my Auth0 Request…

public String getAuthUrl(HttpServletRequest req){
    return this.controller.buildAuthorizeUrl(
            req, getRedirectUrl(req)
    ).withScope("openid email profile").build();

But I cannot figure out how to get the email out of the session in

public void handleCallback(HttpServletRequest req, HttpServletResponse res)

How do I extract out the email without calling back to auth0?

Seems like I can get it like


But that seems really hacky.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.