Angular SPA loginWithRedirect() leads to undefined

Hi everyone,

I really can’t tell why but after i click the Login Button on my Angular App, i wont get redirected to Auth0 Login. Instead I get:


It always leads me to undefined…

This is my env file:

export const environment = {
    production: false,
    hmr       : false,
    auth: {
        domain: 'dev-**********',
        clientId: 'RHB78**************rdvXN',
        redirectUri: window.location.origin + '/callback',
      dev: {

This is my app.module import:

        httpInterceptor: {
          allowedList: [`${}/users`],

Does anyone have an idea why it doesnt pick up the correct domain? I tried so much and I am kind of clueless right now. Looking forward for some advice :slight_smile:

Cheers, Merlin

The same happens when i put authguard infront of my index page e.g. I get the same url.
There are no spelling mistakes in the variables

I moved the AuthModule right under AppRoutingModule and that worked for me :slight_smile:

1 Like

Thanks for sharing that with the rest of community!