Skip to content

500 server error when trying to auth against Digikey #935

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

Open
cnf opened this issue May 12, 2025 · 5 comments
Open

500 server error when trying to auth against Digikey #935

cnf opened this issue May 12, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@cnf
Copy link

cnf commented May 12, 2025

Describe the bug
Similar to #581 , when I try to use the "connect oauth" button for digikey, I get a 500 error

To Reproduce
Steps to reproduce the behavior:

  1. Enter the digikey key and secret in the docker container vars
  2. go to /en/tools/info_providers/providers
  3. click "connect oauth"

Expected behavior
authentication to succeed :P

Screenshots

Image

Server Side

  • Part-DB Version: 1.17.0 docker
  • PHP Version: 8.3.19 (SAPI: fpm-fcgi) docker image
  • Database Server sqlite 3.40.1

Desktop (please complete the following information):

  • OS: Linux
  • Browser firefox

Additional context
I have been poking at this on an off for a few weeks now, It is the return call that is 500ing, after the auth call to digikey succeeded.

It behaves exactly the same behind my reverse proxy on a domain, btw

@cnf cnf added the bug Something isn't working label May 12, 2025
@jbtronics
Copy link
Member

What does the Part-DB log tells?

This is most likely some configuration issue, that either one of the secrets is wrong, something is wrongly configured at digikey or something is wrong about the reverse proxy config. Digikey is quite picky about that.

@cnf
Copy link
Author

cnf commented May 12, 2025

I'm not sure, my logs tend to get spammed with Symphony deprecation issues, and long tracebacks, it is kinda hard to find relevant entries in the noise. Any way to turn those down?

@jbtronics
Copy link
Member

Just search for "CRITICAL". Each log entry gets prefixed with its priority level, and only real errors get the CRITICAL priority.

@cnf
Copy link
Author

cnf commented May 12, 2025

ok, thanks! I get:

[2025-05-12T09:14:40.455452+00:00] request.CRITICAL: Uncaught PHP Exception InvalidArgumentException: "Required option not passed: "access_token"" at AccessToken.php line 96 {"exception":"[object] (InvalidArgumentException(code: 0): Required option not passed: \"access_token\" at /var/www/html/vendor/league/oauth2-client/src/Token/AccessToken.php:96)

This is going directly to the IP, not going through the proxy.

I'll double check the keys, again, to make sure, not sure what else could be wrong?

@cnf
Copy link
Author

cnf commented May 12, 2025

checked, the keys are the right ones.
Best I can tell from the browser network log, auth is succeeding, just not getting to part-db for some reason?
I have tried a few different browsers to make sure it's not some plugin, and even tried my ipad.
All give me the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants