Repository navigation
[BUG] Pocket ID won't work to log in - "OAuth provider did not return an email" #491
Description
Describe the bug
Pocket ID log in doesn't work, not returning an email.
I am using Nginx Proxy Manager (npm), following the guide from here: https://tinyauth.app/docs/guides/nginx-proxy-manager
The on screen web shows:
An error occurred while trying to perform this action. Please check the console for more information
The log file shows:
2025-12-02T14:44:10Z INF cmd/root.go:118 > Starting Tinyauth version=v4.1.0
2025-12-02T14:44:10Z INF internal/service/oauth_broker_service.go:54 > Initialized OAuth service service=pocketid
2025-12-02T14:44:10Z INF internal/bootstrap/app_bootstrap.go:312 > Starting server on 0.0.0.0:3000
2025-12-02T14:44:18Z WRN internal/middleware/zerolog_middleware.go:62 > Client Error address=172.21.0.3:39484 client_ip=172.21.0.3 latency="124.619µs" method=GET path=/api/auth/nginx status=401
...
...
2025-12-02T14:44:18Z INF internal/middleware/zerolog_middleware.go:66 > Request address=172.21.0.3:39558 client_ip=192.168.x.x latency="35.28µs" method=GET path=/api/context/user status=200
2025-12-02T14:44:24Z ERR internal/controller/oauth_controller.go:150 > OAuth provider did not return an email
I can successfully log in using a username/password in the USERS file. This including 2FA.
I have tried with different proxied hosts on my npm. Same error.
My Pocket ID instance has emails verified for all users, and the user I am testing with has an email. I can see the correct data is there when looking at the OIDC Data Preview within Pocket ID.
The same error is happening even if I have:
- all the services running in the same docker-compose file
- or with containers installed via Unraid apps
I have tried the following:
- all containers in the same docker-compose file
- all on the same docker network
- I've tried making new users on Pocket ID, with and without admin rights
- adjusting the scope of
PROVIDERS_POCKETID_SCOPES
Here is my custom config for my npm proxy clients, is there anything missing?
(copied from guide at tinyauth docs )
location / {
# Pass the request to the app
proxy_pass $forward_scheme://$server:$port;
# Add other app-specific config here
# Tinyauth auth request
auth_request /tinyauth;
error_page 401 = @tinyauth_login;
}
# Tinyauth auth request
location /tinyauth {
# Pass request to Tinyauth
proxy_pass http://tinyauth:3000/api/auth/nginx;
# Pass the request headers
proxy_set_header x-forwarded-proto $scheme;
proxy_set_header x-forwarded-host $http_host;
proxy_set_header x-forwarded-uri $request_uri;
}
# Tinyauth login redirect
location @tinyauth_login {
return 302 https://auth.REDACTED.com/login?redirect_uri=$scheme://$http_host$request_uri; # Replace with your app URL
}
To Reproduce
Steps to reproduce the behavior:
Install Pocket ID and Tinyauth with typical config
Expected behavior
Pocket ID log in works, passes data to Tinyauth and proceeds
Screenshots
As above, let me know if you need more.
Logs
2025-12-02T14:44:10Z INF cmd/root.go:118 > Starting Tinyauth version=v4.1.0
2025-12-02T14:44:10Z INF internal/service/oauth_broker_service.go:54 > Initialized OAuth service service=pocketid
2025-12-02T14:44:10Z INF internal/bootstrap/app_bootstrap.go:312 > Starting server on 0.0.0.0:3000
2025-12-02T14:44:18Z WRN internal/middleware/zerolog_middleware.go:62 > Client Error address=172.21.0.3:39484 client_ip=172.21.0.3 latency="124.619µs" method=GET path=/api/auth/nginx status=401
...
...
2025-12-02T14:44:18Z INF internal/middleware/zerolog_middleware.go:66 > Request address=172.21.0.3:39558 client_ip=192.168.x.x latency="35.28µs" method=GET path=/api/context/user status=200
2025-12-02T14:44:24Z ERR internal/controller/oauth_controller.go:150 > OAuth provider did not return an email
Device (please complete the following information):
- OS: Unraid 7.2.1 - I've tried both [community apps as containers] and [docker-compose]
- Browser [firefox, chrome]
- Tinyauth [v4.1.0]
- Docker [e.g. 27.5.1]
- Pocket ID [1.16.0]
**
Additional context
Add any other context about the problem here.
Activity
steveiliop56 commentedon Dec 3, 2025
Can you please provide your docker compose file and the logs in
LOG_LEVEL=trace?Please be careful when posting logs in trace as they contain a lot of sensitive information, I only need the log line that says
Userinfo response body.slater-uk commentedon Dec 3, 2025
My compose file:
My logs:
In the above files, I've changed my domain to redacted, and changed my local IP, e.g 192.168.x.x
Thanks steveiliop56.
steveiliop56 commentedon Dec 4, 2025
Ah I see the issue. You are missing the required scopes. Please check the documentation. Basically you need:
slater-uk commentedon Dec 4, 2025
Oh wow, my fault! That works now I've put the literal text:
openid email profile groupsfor the variablePROVIDERS_POCKETID_SCOPES.So this variable is looking for space separated scopes.
I (incorrectly) thought this variable was looking for the names of the groups within Pocket ID "Manage User Groups".
I have a group called
adminswhich I had set for that variable.My fault, I've incorrectly read the docs.
Thanks Stavros, loving Tinyauth so far! Keep up the good work!
Fixed and closed.