I have a Rails 4 application with my model User and in another Rails 4 application I have a similar model, but not the same. I want to 'connect' the users from app1 to app2 by a token. In short, I don't want my users from app1 to signup in app2, they must have a easy way to access app2.
I must save one token1 in my user from app1 by making a POST request in my app2 that will create the user and will return token1 to be saved on the user from app1. The token will be used not only for authentication. Oauth is not an option.
So I have around a thousand users in app1 and I need to automate this process.
My idea was to make a rake that will do the POST request for every user and in response would set the token1.
My doubts:
Consider setting your own oauth server . Using oauth, user can automatically authenticate on both sites.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.