refresh token lifetime best practices
. 1 Summary — NIST SP 1800-13 documentation This online course will answer your questions on security best practices. Best practices and . - the user's session with the security token service expires Invalidate refresh tokens when the user's password changes Include an audience in the flow and in the access tokens This restricts who accepts the access token in Step 12 Restrict the capabilities of bearer access tokens Keep the lifetime of access tokens as short as possible . By periodically refreshing (or changing) API tokens, you can ensure compromise of an API token doesn't provide long-term access. As long as the refresh token remains valid, it can be used to obtain a new access token. The lifetime of the authorization tokens depends on the use case, but the general recommendation from the OAuth working group is to use short-lived access tokens and long-lived refresh tokens. Best practices for Identity Platform antivirus exclusions list. .NET 5.0 API - JWT Authentication with Refresh Tokens The user's identity as a user principal name (UPN). The string is usually opaque to the client. This service will regularly check whether access token is going to expire, if is, then call the token refresh authentication . The refresh token can be expired due to either if the password changed for the user or the token has been revoked either by user or admin through PowerShell or Azure AD portal. So I want to use Refresh tokens to prevent user from needing to login constantly. The lifetime of a refresh token is much longer compared to the lifetime of an access token. Configurable token lifetime properties. JWT can be used as refresh tokens; these tokens are used to retrieve a new access token. NIST Special Publication 800-63B Refresh access tokens | Okta Developer Usually tokens have: An Idle Timeout. ¶. The documentation is not clear about how long the refresh token should last. For example the idle timeout may be 5 minutes and the life span may be 2 hours. Trending posts and videos related to Oauth Refresh Token Best Practice! If you don't delete the old Refresh token, MaxInactiveTime prevents access if the client tries to access any resource by using the old refresh token after the specified period of time, which can be configured between min 10 minutes to max 90 days.