Reputation: 13340
I am creating an OAuth login for my web app, and I am looking for the most air-tight and efficient way to create / store a request_token. As I understand, it will need to:
What's the best way to create a unique token, and how should I store it (example, what would the table look like?)
Upvotes: 0
Views: 245
Reputation: 255005
md5(uniqid('', true));
+ uniqie index + char(32)
as a column is good enough.Upvotes: 1
Reputation: 14579
You are probably best using an existing framework like oauth-php. It has client and server examples which you can reuse. It support various databases including MySQL. The MySQL schema can be browsed.
Upvotes: 1