Closed jhnferraris closed 9 years ago
Finally figured it out. Authentication flow should be broken down to specific parts
This assumes that $this->service is a FitBit service.
$requestTokenInterface = $this->service->requestRequestToken()
. It should return the temporary token interface that will be used to get the authentication page. Prior to getting the authentication page. Store the temporary oauth token secret somewhere (can be in memcache) and set the temp oauth token as the id.
$tempOAuthToken = $requestTokenInterface->getRequestToken();
$tempOAuthTokenSecret = $requestTokenInterface->getRequestTokenSecret();
$cache = \CMemcache();
$cache->set($tempOAuthToken, $tempOAuthTokenSecret, (60 * 30));
oauth_token
as query parameterThis steps will help others when they are trying to authenticate an app to use FitBit in a stateless (no session) manner.
Hmm, does it not work for you?
@logical-and That does work when you're authenticating it from a browser. But my suggested flow is for when a consumer has a mobile application and has its own api to use for linking.
Anyone who has done the authentication flow of FitBit using Memory storage only? Can you post your workflow here? Thanks!