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).

  1. a (not logged in) user fills in comment form. posts that.
  2. user gets omniauth page can choose sign-in-method: twitter, facebook or openid.
  3. 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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -