auth0 / nextjs-auth0

Next.js SDK for signing in with Auth0
MIT License
1.97k stars 372 forks source link

User creation workflow #1759

Open jpb06 opened 1 week ago

jpb06 commented 1 week ago

Checklist

Describe the problem you'd like to have solved

Hello!

Thank you for maintaining this lib! My team is using it since a while and it works just great.

We recently had a need for a custom signup flow, and we struggled to do what we wanted, ie:

Auth0 support advised us to use auth0 node library to create the user and then call /oauth/token to retrieve an id_token and an access_token. After some back and forth with support, we were finally able to implement something that works.

You can find a POC here: https://github.com/jpb06/auth0-silent-login

Now, the issue is we had to extract logic from nextjs-auth0 (the content of this folder, basically) to perform the following tasks:

From what I could gather, these responsibilities are spread out in internal code that is not exposed by the lib (StatelessSession class, TransientStore class, to name a few).

Redefining that logic in our own codebases is sub-optimal, as creating a session falls within the responsibilities of nextjs-auth0 in our opinion. If implementation details change on this lib, we would be exposed to regressions.

Describe the ideal solution

Thank you for your time ๐Ÿ™‡๐Ÿป

Alternatives and current workarounds

Partially related: https://github.com/auth0/nextjs-auth0/issues/1207

Additional context

No response

andresmarpz commented 1 week ago

Related to #1751, which basically implies the need for an easier silent login workflow, which is highly necessary! Open to help if needed but big ๐Ÿ‘๐Ÿผ to this issue.

richardmon commented 1 week ago

This appears to be a reasonable request. Requiring a newly created user to log in is detrimental to user experience. Hope this gets solved ๐Ÿ‘ .