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

Cannot retrieve OAuth Client credentials: undefined #3691

Closed
FathiBenNasr opened this issue Feb 4, 2021 · 7 comments
Closed

Cannot retrieve OAuth Client credentials: undefined #3691

FathiBenNasr opened this issue Feb 4, 2021 · 7 comments

Comments

@FathiBenNasr
Copy link

FathiBenNasr commented Feb 4, 2021

Hi,
I still have this issue even after upgrading to 3.0.1 and when trying to login i get the error message: Cannot read property 'res' of undefined

@Chocobozzz
Copy link
Owner

Hello,

Please fill the bug template so we can help you.

@Chocobozzz Chocobozzz added Status: Waiting for answer Waiting issue author answer Template not filled Doesn't use or fill one of the issue templates. Can be closed anytime. labels Feb 4, 2021
@FathiBenNasr
Copy link
Author

Sorry,
PeerTube instance: https://veedeo.sncft.com.tn

PeerTube version: 3.0.1
NodeJS version: nodejs/unknown,now 12.20.1-1nodesource1 amd64
Ffmpeg version: ffmpeg/stable,stable,now 7:4.1.6-1~deb10u1 amd64
Redis version: redis-server/stable,stable,now 5:5.0.3-4+deb10u2 amd64
PostgreSQL version: postgresql11-server-11.10-1PGDG.rhel7.x86_64 on a dedicated instance

@Chocobozzz
Copy link
Owner

@FathiBenNasr
Copy link
Author

FathiBenNasr commented Feb 6, 2021

My production.yaml file starts with the following lines as I am behind an ssl reverse proxy. PeerTube real ip address is not routable.

listen:
hostname: 'localhost'
port: 9000

webserver:
https: true
hostname: 'veedeo.sncft.com.tn'
port: 443

So to access this instance you go the following path:
[internet]==>[firewall]==>[reverse proxy ssl]==>[peertube vm: nginx on port 80]==>[peertube vm: peertube on localhost:9000]

@Chocobozzz
Copy link
Owner

Please check your reverse proxy correctly forward the Host header: https://github.com/Chocobozzz/PeerTube/blob/develop/server/controllers/api/oauth-clients.ts#L25

Check also your server logs to see what peertube expects: https://github.com/Chocobozzz/PeerTube/blob/develop/server/controllers/api/oauth-clients.ts#L26

@Chocobozzz Chocobozzz added Type: Question and removed Status: Waiting for answer Waiting issue author answer Template not filled Doesn't use or fill one of the issue templates. Can be closed anytime. labels Feb 8, 2021
@FathiBenNasr
Copy link
Author

Hi @Chocobozzz, maybe i am missing some nginx modules as as you stated the real ip header is not passed even i am using the nginx.conf that comes with 3.0.1.
Could you please tell me which nginx modules are needed under debian buster.

@Chocobozzz
Copy link
Owner

You need https://nginx.org/en/docs/http/ngx_http_proxy_module.html

But maybe it's another part in front of your nginx server that does not correctly set the host: https://github.com/Chocobozzz/PeerTube/blob/develop/support/nginx/peertube#L64

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

No branches or pull requests

2 participants