Redirecting users to a dynamic route with the new Auth0 Angular Library

Hi There,

I’m making an invite function for my angular application, and as part of that, I need to be able redirect to dynamic URLs. Using the old version of the auth0 angular library (I think it was auth0-spa-js) I had a hack that worked, and I want to have a better solution with the better tools that the new angular library provides.

For example, when a user creates an invite link for a friend, it might look like this:

http://localhost:8100/join/1a689e52-f35b-4bda-901c-ea4f076bdc2c/33174e0b-265b-4f8d-a30a-5269c9717d69

i.e. the scheme is localhost/join/{UUID}/{UUID}.

The user flow is that an invite link is generated, the invitee should navigate to that link where the app will redirect them to the Auth0 login/signup page. They’ll create an auth0 account if they don’t already have one, if they do they can just log in.

Once they’ve created that account, they need to be redirected to my route in angular - path: 'join/:companyId/:referral'.

I had previously investigated haveing something like localhost:8100/join/*/* in my callback URL, though at the time I think this was a no-go because of security. This would obviously be the easiest and most friendly option for me, but I understand that it creates bad attack vectors elsewhere.

So that being said, I have everything working except the part where the user is sent to that route after they log in or signup.

What do you think is the best way of achieving this with the new angular library?

Cheers

Alex

Form fill data:

  • Which SDK does this apply to? @auth0/auth0-angular
  • Which verison of the SDK you are using? “^1.1.0”
  • Which version of the platform are you facing this error on? Node 12
  • Was this code working before? Yes, in the previous library, with hacks