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

More meaningful error messages #44

Open
phiros opened this issue Jun 20, 2015 · 2 comments
Open

More meaningful error messages #44

phiros opened this issue Jun 20, 2015 · 2 comments

Comments

@phiros
Copy link
Contributor

phiros commented Jun 20, 2015

Hi,

I have a strider instance running in a docker container behind a Nginx server.
Strider runs on port 3000 and Nginx acts as proxy serving strider via https.
Unfortunately, I only get

500 AuthorizationError: The redirect_uri MUST match the registered callback URL for this application.

errors when I try to connect strider to github. It would be nice if I could see what the redirect_url actually is. Any hints on how to debug this?

BTW:
My environment variables are set similar to the following variables:

SERVER_NAME='https://foo'
PLUGIN_GITHUB_APP_ID=4xxxb
PLUGIN_GITHUB_APP_SECRET=8xxx9

My authorization callback url is (in the github app):
https://foo/auth/github/callback

(foo is just the hostname without a port)

@knownasilya
Copy link
Member

You could put some console logs/breakpoints into the strider-github lib (in your node_modules folder).

@phiros
Copy link
Contributor Author

phiros commented Jun 28, 2015

I facepalmed a little bit when I found out what the problem was.
You must never use quotes around the value of the SERVER_NAME variable.
Strider just concats the value of this variable with auth/github/callback. So I ended up
with a redirect_uri of: 'https://foo'/auth/github/callback instead of https://foo/auth/github/callback.
I am not sure whether you can consider this behavior a defect (in the end it was my own fault). However, I think it might be sensible to display such basic information somewhere in strider. Maybe a small info section next to the Setup Github button?

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