We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
maybe_refresh_token is responsible for getting a new access_token for use in credentials.
maybe_refresh_token
access_token
def maybe_refresh_token(%Credential{schema: schema} = credential) do case lookup_adapter(schema) do nil -> {:ok, credential} adapter -> token = Common.TokenBody.new(credential.body) if Common.still_fresh(token) do {:ok, credential} else wellknown_url = adapter.wellknown_url(token.sandbox) {:ok, refreshed_token} = adapter.refresh_token(token, wellknown_url) update_credential(credential, %{ body: refreshed_token |> Common.TokenBody.from_oauth2_token() |> Lightning.Helpers.json_safe() }) end end end
but the lookup_adapter function isn't detecting these new generic oauth credentials:
lookup_adapter
def lookup_adapter(schema) do case :ets.lookup(:adapter_lookup, schema) do [{^schema, adapter}] -> adapter [] -> nil end end
we should make sure that all generic oauth created credentials are also checked for freshness!
The text was updated successfully, but these errors were encountered:
taylordowns2000
elias-ba
Successfully merging a pull request may close this issue.
maybe_refresh_token
is responsible for getting a newaccess_token
for use in credentials.but the
lookup_adapter
function isn't detecting these new generic oauth credentials:we should make sure that all generic oauth created credentials are also checked for freshness!
The text was updated successfully, but these errors were encountered: