workflow - Saving the Comment object after successfull oauth login with Rails' omniauth -
i want rails either update or store comment after user did successfull loging trough omniauth (twitter, facebook or openid).
- a (not logged in) user fills in comment form. posts that.
- user gets omniauth page can choose sign-in-method: twitter, facebook or openid.
- once user returns oauth successfully, want store (or publish) comment.
i have working, using session-variable, not thread-safe: break if user has multiple comment-tabs open same session.
should save comment database in unpublished state, , toggle after returning? , if so, how know how toggle te correct comment? problem similar abovementioned session-issue.
is there way pass comment-object along omniauth , recieve when user returns successfull sign-in?
or can pass hash-string along can extract after successfull return?
edit: complete rewrite simplify , clarify question.
store post id along comment text in session. on successful authentication, find post using stored id , build comment object it.
update - in case authentication fails, delete such entries.
Comments
Post a Comment