ruby on rails - Cross site session creation with Devise -
i'm working on project uses sessions manage logged in user slight twist, there no log in form on actual application. instead, site provide button should log in user , redirect profile page.
for example, customer viewing profile on site a, 3rd party application. profile on site click on button should log them in site b , redirect profile on site b, site i'm building.
i'm unfamiliar security concerns case this. initial thought if site posts via https user's email address , password, should work if filling form out on site, site b.
what security concerns missing here or not work @ all?
note: 3rd party site out of hands , i'll never convince team setup sort of oauth protocol, or @ least going take unacceptably long. plus, oauth, @ least understanding method accept requests number of 3rd parties. no other site except sitea ever attempt log people in.
this sounds typical application oauth provider.
get overview , grasp concept here: http://en.wikipedia.org/wiki/oauth
there exists oauth providers in ruby, don't have yourself: e.g. https://github.com/songkick/oauth2-provider.
but if wanna without, let other server generate hash containing users id (can username, email, or database id), random token, current timestamp , sign using messageverifier. can check on server if timestamp within range (some minutes) , if message verifies (using same key naturally). if so, accept user.
if other site uses php, might have rebuild generate
method in php. find source in ruby here.
Comments
Post a Comment