OAuth 2.0 refresh token

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2023 01:44 AM
Hi all developers,
I working on a new integration with 3rd party application. The authentication is done via Okta where I get the token. The token is valid for 1 h. I created a custom action with REST step in Flow Designer. This action is getting a list of the application using the token in the header as [Authentication = Bearer {token}]. The problem is with the refreshing token. Every hour I need to refresh the token manually. The goal is to refresh the token every hour or check if the token expires. I created a new application registry with Configure an OIDC provider to verify ID tokens. This application profile is used in the alias but not working as expected. Can you please advice me on how to handle this type of authentication?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2023 07:33 PM
oAuth tokens are stored in oauth_credential table. Look up this table for your provider based on peer.name column for expiry and request a new token if not found. You can do this from your custom action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 10:22 AM
@tomeczek1 How did you achieve this? Were you able to refresh the tokens every hour?
THanks