twilio-labs / vestlus

A conversational app.
MIT License
8 stars 2 forks source link

User Creation? #26

Closed mfreeman-xtivia closed 1 year ago

mfreeman-xtivia commented 2 years ago

Based on looking at the Twillio Console, I can see that if I register a new user in the app, that user is being automagically created in Twillio as well.

But for the life of me I cannot figure where/how in the code for this app that is actually happening?

It appears the calls to /api/register are simply geared toward putting the user in the local JSON store only. Can you shed some light on where & how Twillio user creation happens?

Thanks

stanlemon commented 2 years ago

Ahoy! This is the best reference for what is going on here https://www.twilio.com/docs/conversations/create-tokens basically Twilio has a concept of a user for Conversations, but it doesn't manage authentication. You can manage your own authentication and then create a token for that user which maps to a user. Hope that helps!