Git Product home page Git Product logo

Comments (4)

simov avatar simov commented on April 28, 2024

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;
  }
}

from grant.

talkingtab avatar talkingtab commented on April 28, 2024

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.

from grant.

simov avatar simov commented on April 28, 2024

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:

https://[domain]/connect/amazon/callback

And set at least one scope, because having at least one scope set for Amazon is required:

scope: ['profile']

from grant.

talkingtab avatar talkingtab commented on April 28, 2024

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!

from grant.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.