qer-app-portal development v91: oAuth authentication

Hi,

I'm finishing our customizations on qer-app-portal and I've found these situations where the user wants to log in with oAuth and google credentials:

  • development workstation: If I set the configuration to development (environment.ts , clientURL pointing to the local apiserver running with imxclient) the oAuth dialog is never started. The login screen returns to the login page.
  • development workstation: If I set the configuration to production (environment.ts clientURL pointing to our production apiserver https://<productionserver>/apiserver, cors disabled) the oAuth dialog with google appears. After a succesful login , the page returns to https://<productionserver>/?redirected=true%code=<tokens> but shows the IIS standard page only.
  • If I upload the project to our production apiserver , the oAuth dialog appears and after a succesful logon, I'm returned to the login page with a error: TypeError. this.remaining is undefined , if running firefox, or TypeError: Cannot read properties of undefined, reading 'StartsWith' if using Chrome
  • If no customizations are uploaded and I use the standard api portal , it works like a charm

I've tried with a fresh copy of the github project in case I messed up our custom code, but the problem is still there.

Anyone has any idea how to "really" emulate production in our dev environment? I guess I need to "trick" the clientURL somehow but I cannot figure out how. 
Thanks!!

Parents
  • Hi,

    Please check the imxclient API server for your development workstation. It needs to be started with a /baseurl parameter value. This base URL must match exactly an entry in the QBMWebApplication table so that the API Server can find its OAuth configuration.

    The OAuth flow is baked into the login page and the underlying qbm services -- have you customized anything in that area?

    Also, I would check the HTTP traffic and specifically the URL that the OAuth IDP uses to redirect to Identity Manager.

    Regards
    Hanno

  • Hi, thanks Hanno. I haven't customized anything in that area. I'll have a look at those settings and come back.

    Regards!

Reply Children
No Data