I have saved the credentials after login but got different access token and id_token while retrieving

I have integrated SSO in my iOS app and I’m saving the credentials as below.

try Credential.store(token, tags: [OEConstants.SSOConstants.ssoCredTag: OEConstants.SSOConstants.ssoCredValue])

And retrieving the credentials as

let credential = try? Credential.find(where: { $0.tags[OEConstants.SSOConstants.ssoCredTag] == OEConstants.SSOConstants.ssoCredValue}).first

While saving the access_token and id_token values are different. While retrieving got different access_token and id_token values. Due to this I’m facing the 400 bad request while performing the logout. It showing error message as Id_token subject does not match current session’s user.

Hello @maheshnarla,

Are you working with okta-mobile-swift? If so, you might try checking to make sure you’re calling the same credential provider and clearing out old ones: Documentation

1 Like