I have a Swift App, which implements the web login for Auth0. On successful login, i receive an access token and and idToken, which i both store in my Keychain. Upon next login, i first check, if the access token is still valid by
Auth0
.authentication()
.userInfo(withAccessToken: accessToken)
.start { result in
switch result {
case .success(result: let profile):
print("access token still valid")
And proceed with my app without my user having to login again. The issue i’m having however is that my idToken might be expired already, so even checking if access token is still valid, i might have an expired idToken, which leads to errors when i request my backend with this idToken. So how do i solve this? Is there a way to check, if my idToken has expired in Swift?