Hi there,
I’m working on the React app that uses auth0-spa-js
for the whole client-side authentication flow. To put it more plainly when user hits ‘Sign-Up’ button he is redirected to the Auth0 Universal Login Page and after sign-up he is redirected back to the app with the app store data being populated with user data.
It works great, but currently I would like to provide users with alternative path, when they can create an account directly inside my app which requires custom sign-up panel - handling email / password provided by the user and sending it to the Auth0 API.
I have prepared the panel and implemented auth0-js
(since auth0-spa-js
doesn’t seem to provide a method for signing-up users directly) and it works. So by using WebAuth
and signupAndAuthorize
method I’ am able to create new user records inside the DB and get an accessToken
and idToken
back.
So my question is, is there any way to achieve the same result with using only auth0-spa-js
? Or at least to pass the received token to the instance of the auth0-spa-js
that handles all the authentication user flow inside my app to keep user-related logic in one place?