question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No auth configuration available for refresh token

See original GitHub issue

When i use the method performActionWithFreshTokens after the auth flow completion, and after the access_token is expired, I receive:

java.lang.IllegalStateException: No authorization configuration available for refresh request

What could be gone wrong? Parsing the response? I’ve saved the authState json previously, but I don’t see any lastAuthorizationResponse key…

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:19
  • Comments:6

github_iconTop GitHub Comments

3reactions
juanmendezcommented, Feb 11, 2020

This is quite helpful, if you see no refresh-token being provided either the first time tokens are generated or when they are refreshed, make sure to include offline_access to your scope This is the way it worked for me.

1reaction
juanmendezcommented, Feb 7, 2020

prior to saving your authState json, ensure you have updated the authState with an authenticationResponse and also with tokenResponse

// this is following the activity result
authState.update(authorizationResponse, ex) 

 // this comes following authService.performTokenRequest(request)
authState.update(tokenResponse, ex)

// so add a breakpoint, when you get here and see if your authState has both responses 
yourStoringFunctionality( authState.jsonSerializeString() )

// now when you need to refresh, first time just check if everything is in sync with the responses stored
val lastState = AuthState.jsonDeserialize(authStateJson)
lastState.performActionWithRefreshTokens( authService, clientSecretIfApplies, handler )

after your handler gets new accessToken, and idToken, your authState is automatically updated with those tokens, and there is no need to invoke update method again. Now you need to store it such as done above yourStoringFunctionality( authState.jsonSerializeString() ).

I have to say that the documentation is not very extended in how to do this

Read more comments on GitHub >

github_iconTop Results From Across the Web

No authorization configuration available for refresh request okta
Inside Okta >> Admin >> Applications >> OIDC application >> General tab, do you have “Refresh Token” selected for “Allowed grant types”?
Read more >
Configure Refresh Token Expiration - Auth0
Enter Absolute Lifetime in seconds. The refresh token expires after the specified interval and can no longer be used to get a new...
Read more >
Understanding Refresh Tokens - Auth0
While refresh tokens are often long-lived, the authorization server can invalidate them. Some of the reasons a refresh token may no longer be...
Read more >
Use Refresh Tokens - Auth0
To learn more about the authentication methods available for the Authentication API, read Authentication ... to configure this snippet with your account.
Read more >
Use Refresh Token Rotation - Auth0
The SDK uses the iframe method if you have set useRefreshTokens to true but no Refresh Token is available in the cache. This...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found