I am new to rubies and rails, and so far I have managed to set up user management through development. Now I am trying to integrate support for mobile applications for Android and iOS. So far, they have managed to log in and log out and get an authentication token. But in addition to this, I would also like them to be able to register.
Now, as I understand it, I need to make a message for
http:
What does this post look like? And how do I get a JSON response? I found this on https://stackoverflow.com/a/318440/169 .
"utf8=✓&authenticity_token=n5vXMnlzrXefnKQEV4SmVM8cFdHDCUxMYWEBMHp9fDw%3D&user[email]=asd%40fasd.org&user[password]=321&user[password_confirmation]=1233&commit=Sign+up"
Unfortunately, this did not work - I get a "Bad Request" message. I also have some questions about this example. What is authenticity_token for? How to get it? This is not token authentication, which I assume, since the user cannot even have it at the moment.
In addition, after a successful login, I would like to associate the message with the registration with a successfully generated authentication token. Therefore, I assume that I need to somehow expand the existing development registration controller.
Thank you in advance!
source share