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
How to debug? #49
Comments
Yep amazon accepts only https protocol as redirect URL. That's the first result from Google when you search for expressjs https. I personally use NginX on my workstation as a proxy server on top of my node web server processes. Here is the NginX vhost configuration for the example app: server {
listen 80;
listen 443;
server_name grant-oauth.herokuapp.com;
ssl on;
ssl_certificate /home/path/grant-oauth/config/public.pem;
ssl_certificate_key /home/path/grant-oauth/config/private.pem;
allow 127.0.0.1;
access_log /var/log/nginx/grant-oauth-access.log;
error_log /var/log/nginx/grant-oauth-error.log debug;
# node
location / {
proxy_pass http://127.0.0.1:3000/;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
} |
Thanks very much for the help. I wasn't clear, I guess. I have https working with letsencrypt providing the certificate. And only https is running.Facebook works just fine over https, I just can't get Amazon to work and I am trying to come up with a way to find out what is wrong. I was hoping there was some debugging facility or way to get a clue. |
You can always add a breakpoint inside your dependency code and expect what's going on. Authenticating with Amazon is working here: https://grant-oauth.herokuapp.com/#/amazon You just have to set your redirect URL to use https:
And set at least one scope, because having at least one scope set for Amazon is required: scope: ['profile'] |
My mistake was that I create a grant object programmatically and I didn't set an Amazon provider. I found my problem by comparing url's for Facebook that was working, and for Amazon. Amazon did not have a client key set, nor a scope, etc because I had not appended the provider. It would be a nice feature to have some error reported when calling http://domain/connect/provider when there is no matching provider in the grant. Thank you for the help! |
I am trying to get the amazon provider to work, I'm having problems but I have no idea what the problem is. I have Facebook working. How does one debug this? I'm thinking of writing a simple server using just the node https server (since it seems like Amazon only works with https, not http). Any help, ideas, suggestions? Thanks
The text was updated successfully, but these errors were encountered: