Renew token after Ueberauth callback

Ueberauth strategies work only for authorization part and getting the first set of secret code and tokens. After that, the Elixir app is responsible for renewing the tokens. However, most adapters do not expose functionality to renew the token using one of the helper functions.

In my case, I am using Keycloak as a strategy for Ueberauth.

What is the best practice for renewing tokens after the callback phase from Ueberauth is finished?

I suspect you’ll need to use Ueberauth.Strategy.Keycloak.OAuth.client/1 and Oauth2.Strategy.Refresh as seen in the second example for the client credentials flow.

1 Like