Continue Discussion 10 replies
August 2019

konrad.sopala Community Engineer

Hey everyone! We’re closing this thread for now but feel free to reopen it anytime you feel like asking a question!

December 2019

hubca

It’s a useful article but it doesn’t include how to hook up automatically retrieving a new authorisation code when the the current one expires… so kind of feels unfinished

1 reply
December 2019

konrad.sopala Community Engineer

Thanks for providing that feedback! Let me tag the article author here @steve.hobbs so he can address that once he’s online

December 2019 ▶ hubca

steve.hobbs Auth0 Employee

Hey @hubca, thanks for reading.

It doesn’t cover the scenario you describe because that’s not really the responsibility of the API. It consumes the access token but is not responsible for fetching new ones when they expire.

That would normally be the responsibility of the thing that calls the API, like a web application, SPA, etc. Building that application is out of the scope of this article.

1 reply
December 2019

konrad.sopala Community Engineer

Thanks a loot for sharing it Steve!

December 2019 ▶ steve.hobbs

hubca

Thanks for the response @steve.hobbs. I guess I’m looking at this as someone who has built the API with the primary objective of securely accessing our own endpoints (in our application). I’m just currently lacking knowledge of the correct way to apply the oAuth flow in order to refresh expired tokens. It’s a really useful article of course.

December 2019

konrad.sopala Community Engineer

Thanks for the feedback on the article!

September 2022

phelps-sg

The dependencies in the example are very out of date, and the jwt-scala API has changed since the blog was written. I have opened a pull request to update dependencies here: https://github.com/auth0-blog/scala-api-sample/pull/1.

February 2024

mish

I agree with @phelps-sg, and I’ve posted a new issue (since the above PR is also a bit old I think for the sbt, scala, and play version).
can you please @steve.hobbs help a bit if possible? suggest the versions that should work, and I will give it a try.

1 reply
February 2024

mish

created above issue, after adjusting the dependencies, and also wrote the work around. (note the issue documented the latest versions of the libs used)