Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification for testing #41

Open
JKMcCloskey opened this issue Nov 23, 2019 · 0 comments
Open

Clarification for testing #41

JKMcCloskey opened this issue Nov 23, 2019 · 0 comments

Comments

@JKMcCloskey
Copy link

Hello,

I'm probably doing something wrong in testing, and could do with some clarification.

Initial problem report:
In Strava API settings I have set the Authorization Callback Domain to localhost:8000

I have used "oauth-flow.php", from examples and I have the following set:
define('CALLBACK_URL', 'http://localhost:8000/oauth-flow.php?action=callback');

Note I did move this from:
./strava-oauth-master/PHP2/vendor/iamstuartwilson/strava/examples/oauth-flow.php
To:
./strava-oauth-master/PHP2/index.php

I setup a test server using:
php -S localhost:8000/oauth-flow.php?action=callback

And get this response in terminal:
PHP 7.1.23 Development Server started at Sat Nov 23 09:51:04 2019 Listening on http://localhost:8000/oauth-flow.php?action=callback Document root is /<VARIOUS_DIRECTORIES>/strava-oauth-master/PHP2 Press Ctrl-C to quit.

I then put this into the browser address bar:
localhost:8000/oauth-flow.php?action=callback

And get an error "The requested resource /oauth-flow.php?action=callback was not found on this server."

Further testing conducted:
I tried removing oauth-flow.php?action=callback from the CALLBACK_URL in the test php script as well as the command to launch the test server.

The result was that the webpage loads. I get an authorisation code in the browser address bar after clicking on "Start oAuth Authentication Flow". The authorisation code changes on each click.

When I click on "Refresh Access Token" I get the following:

Session Contents (before)
Array
(
[strava_access_token] =>
[strava_refresh_token] =>
[strava_access_token_expires_at] =>
)
Refresh Token
Session Contents (after)
Array
(
[strava_access_token] =>
[strava_refresh_token] =>
[strava_access_token_expires_at] =>

Any ideas on what I'm doing wrong?

Many Thanks,

James

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant