chok / sfMelodyPlugin

Allow to communicate with many services(google, yahoo...) throw OAuth
MIT License
45 stars 21 forks source link

How do I save Access token and secret for future use? #11

Open savannahbeckett opened 14 years ago

savannahbeckett commented 14 years ago

I don't want my web application to ask user to grant access every hour. How do I save the ACCESS GET request for future use and save it to database? or can I save the access token and secret into the database? If so, what function should I call? Thanks.

chok commented 14 years ago

It's automatic but it's depend on the expiration of the token. Some tokens have expiration time some not.

All tokens for a connected user is stored and when the user isn't connected. You ask for a new token or to recognize an existing token.

Is that clear ?

savannahbeckett commented 14 years ago

I understand, but I am trying to store the access token in my backend server for further connecting which has no interaction with user. So my frontend server will get the access token and do its own thing, then send the access token to my backend server for them to do more connecting.

chok commented 14 years ago

If you always need help sorry for the wait :D !

For the same connection (project) which share the same tables, if you have store tokens you can use in all of your applications.

danieljarrett74 commented 13 years ago

I think what savannahbeckett was getting at is possible the same thing I am trying to figure out how to do.

I want a way to delay the creation of a user until the visitor has completed a further details registration form.

So the user has the option of signing up with facebook connect or without. if they click the facebook connect option then the following happens.

  1. they are forwarded to facebook for authentication.
  2. they are returned to a registration page on my site with certain form fields pre populated.
  3. user fills out remaining fields and submits.
  4. all user information is saved to sf_guard_user table and token table as well as my profile table which contains the extra information.

How would i go about doing this?