Custom Signup Flow & Sign in

Hi Everyone,

I’m new to Auth0 but loving it so far and looking to implement it into a new SaaS project. I apologise in advance for any stupid questions, as I said, this is new to me.

Before I explain the problem I’ll explain my architecture. The app will be an Angular SPA with a Laravel 9 API. I am using a custom package I’ve built to interact with the management API. I’ve included it below so you can see how I interact with the API.

Now the idea is I want to handle signups (user creation) via the management API. I’ve built an endpoint on our API that creates a local user record (for database relationships) then creates an Auth0 user and maps the two together. It then creates an organization in Auth0 which is bound to the tenant database.

The reason for this approach is because there will be multiple points of entry into our software, multiple forms where users can sign up, and we don’t want to necesarilly direct them to the register form shipped with Auth0, we would prefer to do it all through our own endpoint.

I’m able to do the above with no problems, however, the question or problem I have is in relation to logging that user in automatically once they have registered. How do we do this if we are not using the universal login experience. Does the Angular SDK have the ability to handle other methods of logging in or just the universal login way?

Ideally i’d love it if we could handle the registration, programatically log the user in, and deliver the access and refresh token back to the frontend where it is acknowledged and used by the Angular SDK. Is this possible? Or is there a better way to do this?

We just want to be able to sign users up via the API amd them be logged in straight away and not have to navigate to the login page afterwards.

Thanks in advance,
Rob