iTwin / itwinjs-core

Monorepo for iTwin.js Library
https://www.itwinjs.org
MIT License
593 stars 211 forks source link

Always getting an invalid_client on getAccessToken() #2104

Closed BaoTon closed 3 years ago

BaoTon commented 3 years ago

Steps to repro:

  1. Register a new service using https://developer.bentley.com/register/
  2. Construct new AgentAuthorizationClient() with passed in clientId/secret/scopes
  3. Call .getAccessToken(clientRequestContext)
  4. Returns Authorization error: invalid_client (Invalid client or client credentials.)

It seems I can still retrieve older access tokens from older agents/services, but any newly created agents/services always fail. Am I missing something?


⚠ Do not edit this section. It is required for imodeljs.github.io ➟ GitHub issue linking

calebmshafer commented 3 years ago

@BaoTon there was a scheduled maintenance period today with IMS causing any client registrations to not be fully completed until the maintenance concludes. I believe, and I'll need to confirm, that all client registrations made during the scheduled outage were cached and then will be applied once the maintenance is completed. Which means once the maintenance is over you should be able to use the registered client.

Please check here for scheduled maintenance and when the IMS will be back up and fully running, https://status.bentley.com.

If the client is still not available by tomorrow, please reach back out and we will look into what may have gone wrong.

BaoTon commented 3 years ago

Thanks Caleb, looks like I got stuck in between maintenance. Cheers.