How to define callback for auth0 redirectUri using Javascrip action

0
I am using Mendix 8.8 blank template. My homepage has Nanoflow button that call Javascript_Action which is calling authorize() from auth0-js – see code below. My issue is after I am adding my user and password the browser redirect to localhost:3000/callback….and then it say an error: This localhost page can’t be found No webpage was found for the web address: The question is: How can I define a pgae localhost:3000/callback in Mendix so the redirect will go to some mendix page? var myauth0 = new auth0.WebAuth({ // the following three lines MUST be updated domain: domain, audience: 'https://webkey-dev.auth0.com/userinfo', clientID: clientid, redirectUri: window.location.origin + '/callback', responseType: 'id_token', scope: 'openid profile' }); myauth0.authorize();  
asked
2 answers
1

You'll need to implement a requesthandler for this, see this blog for more information: https://www.mendix.com/blog/requesthandlers-at-your-service/

answered
0

Dear Ahmed,

There is demo module/project in the app store that uses Auth0 

https://appstore.home.mendix.com/link/app/110989/

You could have a look how it was implemented.

I probably creates a callback handler

In some cases you could use https://appstore.home.mendix.com/link/app/43/ for creating callback URLs. 

Cheers, Andries

answered