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

\"error_description\":\"Invalid client_id\"}") #8

Open
crspybits opened this issue Sep 24, 2021 · 0 comments
Open

\"error_description\":\"Invalid client_id\"}") #8

crspybits opened this issue Sep 24, 2021 · 0 comments

Comments

@crspybits
Copy link
Owner

crspybits commented Sep 24, 2021

I returned to doing some testing with the ESS, and got the following when my test attempted to do a /token request to refresh the access token:

root@0b7d9b20cb90:~/Apps/ServerSolidAccount# swift test --enable-test-discovery --filter  ServerSolidAccountTests.GeneralTests/testDownloadExistingFile
[2/2] Merging module ServerSolidAccount
Test Suite 'Selected tests' started at 2021-09-24 00:30:29.626
Test Suite 'GeneralTests' started at 2021-09-24 00:30:29.644
Test Case 'GeneralTests.testDownloadExistingFile' started at 2021-09-24 00:30:29.644
Body: grant_type=refresh_token&refresh_token=VVwI1RtZGuQzSwqWeo2Srzwd1I80HMno&client_id=u2LAQ2cmfjsJAZOAgXP8MzKtmWopKAyx
request: Optional(https://broker.pod.inrupt.com/token)
request.allHTTPHeaderFields: Optional(["Authorization": "Basic dTJMQVEyY21manNKQVpPQWdYUDhNekt0bVdvcEtBeXg6NFJSSTU0b3JLQ2xzcjJMR2FEWnFqeEJ5MXFSWEZ3RjY=", "Dpop": "<snip>", "Content-Type": "application/x-www-form-urlencoded"])
String: Optional("{\"error\":\"invalid_client\",\"error_description\":\"Invalid client_id\"}")
<EXPR>:0: error: GeneralTests.testDownloadExistingFile : threw error "badStatusCode(401)"
Test Case 'GeneralTests.testDownloadExistingFile' failed (0.753 seconds)
Test Suite 'GeneralTests' failed at 2021-09-24 00:30:30.398
	 Executed 1 test, with 1 failure (1 unexpected) in 0.753 (0.753) seconds
Test Suite 'Selected tests' failed at 2021-09-24 00:30:30.398
	 Executed 1 test, with 1 failure (1 unexpected) in 0.753 (0.753) seconds

It looks like the registration for the client has expired.
Given that I'm trying to have a custom server that can run without the client having to re-register, I'm not sure what the fix is. Can the registration happen again on the server, without having to involve interaction with the user?

The last time I was doing these tests was on [2021-09-21T04:44:36.671Z]-- and at that time the /token request refresh was working fine.

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

No branches or pull requests

1 participant