SE17GroupH / Zap

Exploring different ways of authentication
GNU General Public License v3.0
1 stars 0 forks source link

Storing user data on server #46

Closed thegreyd closed 7 years ago

thegreyd commented 7 years ago

For voice login, every user has to create a new profile with the Microsoft API. Every time the app is freshly installed we create a new voice login profile. Currently we can create only 1000 profiles. I was thinking of storing the profile id associated with each email address on the server.

Share your thoughts, and how easy is it to implement.

DevArenaCN commented 7 years ago

It's fairly easy to do I guess, I can add another API call to it, once the user is registered with the voice on Microsoft side, you can do an API call to our server and update the voice id on the server side. Is that something that's gonna work? If so I'll start now, hopefully it will be done before tomorrow's meet up.

thegreyd commented 7 years ago

When an email is registered, we can create the voice profile id automatically on the server, and then return it with the login call response(with auth token and all). The voice create profile api call is fairly simple. What do you think?

thegreyd commented 7 years ago

That way he wouldn't have an extra api call.

DevArenaCN commented 7 years ago

So the id is something we generate, not generated on Microsoft side? If so, there's already an id column in the database right now. I think we can just use that if that's the case.

thegreyd commented 7 years ago

The id is generated at microsoft's side and returned as a response to an api call.

DevArenaCN commented 7 years ago

Since it's generated on Microsoft side and it's gonna return to the app itself, I don't see how it's gonna passed to the server without the app sending a call to the server side. Maybe I'm getting this wrong, but could you go into more detail about this? Thanks!

thegreyd commented 7 years ago

So what happens is -> user receives email confirmation. User clicks on email, then on the backend you would confirm the email, then make an api call to Microsoft, receive the profile id and store it with the respective user. Then when that user does login, you retrieve from the database, and return it with the login api call response (as an extra parameter). I receive the profile id and store it in the app.

thegreyd commented 7 years ago

This does sounds a little complicated :sweat_smile: and maybe unnecessary. But the point is to separate the new profile creation for voice api from the app so that we don't run out of profiles.

DevArenaCN commented 7 years ago

Ah, gotcha, I'll see what I can do from the server side, can't make any promise though. Could you give me some details on how to make the API call with Microsoft side? Thanks!

thegreyd commented 7 years ago

Yeah. Here is the create profile implementation details: https://westus.dev.cognitive.microsoft.com/docs/services/563309b6778daf02acc0a508/operations/563309b7778daf06340c9652

DevArenaCN commented 7 years ago

I'm moving this issue to the server side. Closing on this end