Should I store my Facebook access tokens?

I’ve built a custom login page for a WordPress site which uses Facebook for authentication.

Is there any reason to store the Facebook access token in my WP database, or does it make more sense to use a PHP session? Are there any benefits to storing these values on my server?

2 Answers
2

There are a number of explanations here:
https://developers.facebook.com/docs/facebook-login/access-tokens

The time it takes for your server to talk with facebook does contribute to a good amount of slowdown. So it depends on how intensely you plan to use the api.
In that case, storing the key and other fb related user data can cut that cross-talk considerably.

If you are just using facebook as a login authenticator I don’t think you need to bother.

Cheers.

Leave a Comment