Closed Curtis1011 closed 4 years ago
It seems you either didn’t follow the OP steps exactly or introduced some OP misconfiguration.
I’m going to go ahead and close this since there’s no openid-client problem to be seen here and your next step should be debugging your OP.
Hi, I was testing the overall flow of openid with oidc-provider and openid-connect.When I was going through the step by step examples in oidc-provider 00-02, all of them works fine and I am able to get userinfo at the end.However I encountered a problem when I was trying to use the /03-oidc-views-accounts index.js.
I was able to obtain the code from the exchange, but I wasn't able to exchange for an access token and this error keeps popping up.
(node:19535) UnhandledPromiseRejectionWarning: OPError: invalid_grant (grant request is invalid) at processResponse (/home/cchau/Desktop/auth_gateway/node_modules/openid-client/lib/helpers/process_response.js:39:13) at Client.grant (/home/cchau/Desktop/auth_gateway/node_modules/openid-client/lib/client.js:1068:26) at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Client.callback (/home/cchau/Desktop/auth_gateway/node_modules/openid-client/lib/client.js:480:24)
After some digging, when I removed the findaccount:Account.findaccount in the config for the issuer on the server side code , I was able to exchange the code for an access token again.
I was wondering if this is the source of the problem or am I missing something?
Also when searching for a solution, I tried the solution provided by #198, But in both instances they gave me the same error. Thank you!
OIDC Server side:
Open-Id Client side code: