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

connection problems #4

Closed
Chrisblueeyes83 opened this issue Mar 7, 2020 · 21 comments
Closed

connection problems #4

Chrisblueeyes83 opened this issue Mar 7, 2020 · 21 comments

Comments

@Chrisblueeyes83
Copy link

the connection problems stays.
i´m getting this error:
{"message":"Bad Request","errors":[{"resource":"Application","field":"redirect_uri","code":"invalid"}]}

@alexanderzobnin
Copy link
Collaborator

@Chrisblueeyes83 Hi! Make sure your Authorization Callback Domain at Strava app page meets your grafana instance domain.

@Chrisblueeyes83
Copy link
Author

Chrisblueeyes83 commented Mar 10, 2020 via email

@alexanderzobnin
Copy link
Collaborator

It doesn't matter I think. The only requirement is matched domain. So if you access grafana with http://grafana.my.domain.com, set Authorization Callback Domain to grafana.my.domain.com.

@Chrisblueeyes83
Copy link
Author

Chrisblueeyes83 commented Mar 10, 2020 via email

@alexanderzobnin
Copy link
Collaborator

"code":"invalid" means authorization code obtained from Strava (you can see it in the url as a code param) is not valid or was used more than one time. Do you use latest plugin version (1.1.1)?

@Chrisblueeyes83
Copy link
Author

Chrisblueeyes83 commented Mar 10, 2020 via email

@alexanderzobnin
Copy link
Collaborator

Yes, click Connect with Strava button to obtain new code from Strava.

@Chrisblueeyes83
Copy link
Author

i tried it many times, but it did not work. always the same error message.

@alexanderzobnin
Copy link
Collaborator

Could you post your Strava app config?

@Chrisblueeyes83
Copy link
Author

image

@alexanderzobnin
Copy link
Collaborator

And could you also post redirect URI from page where you get error, like:

https://www.strava.com/oauth/authorize?client_id=12345&response_type=code&redirect_uri=http://wrong.grafana-zabbix.org/datasources/edit/1/&approval_prompt=force&scope=read_all,profile:read_all,activity:read_all

@alexanderzobnin
Copy link
Collaborator

But in your URI redirect_uri doesn't match your domain in strava app.

@Chrisblueeyes83
Copy link
Author

i see, but why?

@alexanderzobnin
Copy link
Collaborator

Do you access your grafana by grafana.boehm-folien.at or 192.168.1.225?

@Chrisblueeyes83
Copy link
Author

i tried it first with 192.... then grafana.boehm-folien.at no difference, always the same error

@alexanderzobnin
Copy link
Collaborator

Try using 192.168.1.225:3000.

@Chrisblueeyes83
Copy link
Author

didnt work. i tried almost any configuration

@alexanderzobnin
Copy link
Collaborator

I'm 99% sure it's because redirect_uri doesn't match callback domain.

@Chrisblueeyes83
Copy link
Author

finaly, i get it working! :)

@Chrisblueeyes83
Copy link
Author

i wrote the redirect uri with port number. that was the problem.
image

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

2 participants