Instance Method

refreshTokenIfNeeded()

Refreshes the current access token if it is expired or about to expire.

Declaration

func refreshTokenIfNeeded() async throws

Discussion

This is typically called automatically before making API requests that require a valid authentication token.