Best answer

Oauth2 Access Token Expiring Instantly

  • 23 April 2021
  • 4 replies
  • 497 views

Userlevel 1

Hello,

 

I have an issue with an integration I’ve created recently.

I first used a public client to authenticate/authorise and it worked without any issues.

I have changed that to a confidential client, and now I’m having issues with the access token.

 

I used Zapier CLI to create this, and after I successfully connect the account, after 3-4 seconds I get this message: “This account is expired.Please reconnect it here.”

Everything else seems to be fine, the client_id and client_secret should be ok, since I don’t get any errors when authenticating, but the token expires way too soon and I don’t understand why.

If I’m reproducing the actual flow to get the token using the same client, on Postman for example, I get a lifespan that has nothing to do with 3-4 seconds, so the configurations on my auth server can’t be the problem.


Thank you in advance!

icon

Best answer by ikbelkirasan 24 April 2021, 19:17

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

Userlevel 1

Thanks for the answer, indeed the test endpoint was failing due to server restrictions using this client for the test api endpoint.

Userlevel 4
Badge +5

What is the App you are trying to OAuth to?

I run into this when the OAuth requires some additional parameters to provide the refresh_token.  Things  like offline, or consent, etc.  I have also run across instances where the client/secret must be included in the token/refresh as a Basic username:password in base 64.  

 

 

Userlevel 7
Badge +12

Hi @clarrow - Receiving This account is expired.Please reconnect it here message instantly means that there’s something wrong with your OAuth2 test function. Try to check the Monitoring section to find out what’s going wrong.

Userlevel 1

Just realised I’ve posted in General Questions, can someone move it to Developer forum please? Thanks!