# SDK(v3.11.1) signout method fails when when app is inactive for 3 to 4 hours

**URL:** <https://devforum.okta.com/t/sdk-v3-11-1-signout-method-fails-when-when-app-is-inactive-for-3-to-4-hours/23571>\
**Category:** OAuth/OIDC\
**Created:** [March 7, 2023, 8:10pm UTC](https://devforum.okta.com/t/sdk-v3-11-1-signout-method-fails-when-when-app-is-inactive-for-3-to-4-hours/23571 "2023-03-07T20:10:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajeshlv](https://avatars.discourse-cdn.com/v4/letter/r/ecc23a/32.png) [@rajeshlv](https://devforum.okta.com/u/rajeshlv)\
**Post date:** [March 7, 2023, 8:10pm UTC](https://devforum.okta.com/t/sdk-v3-11-1-signout-method-fails-when-when-app-is-inactive-for-3-to-4-hours/23571/1 "2023-03-07T20:10:06Z")

</div>

OKTA sdk oktaoidc.signout method fails when app is inactive for sometime and user tries to logout by calling the signout method. Is this an issue with this sdk version. I am using SDK version 3.11.1.

---

<div class="post-metadata">

**Author:** ![warren](https://avatars.discourse-cdn.com/v4/letter/w/97f17d/32.png) [@warren](https://devforum.okta.com/u/warren)\
**Post date:** [March 7, 2023, 11:48pm UTC](https://devforum.okta.com/t/sdk-v3-11-1-signout-method-fails-when-when-app-is-inactive-for-3-to-4-hours/23571/2 "2023-03-07T23:48:54Z")

</div>

Are you able to provide the GitHub link to the SDK you’re using? My guess is that the id\_token has expired so the call to the `/logout` endpoint might be failing.

> **[OpenID Connect & OAuth 2.0 API | Okta Developer](https://developer.okta.com/docs/reference/api/oidc/#logout)**
>
> Find information about the OAuth 2.0 and OpenID Connect endpoints that Okta exposes on its authorization servers.

---

<div class="post-metadata">

**Author:** ![rajeshlv](https://avatars.discourse-cdn.com/v4/letter/r/ecc23a/32.png) [@rajeshlv](https://devforum.okta.com/u/rajeshlv)\
**Post date:** [March 8, 2023, 3:14pm UTC](https://devforum.okta.com/t/sdk-v3-11-1-signout-method-fails-when-when-app-is-inactive-for-3-to-4-hours/23571/3 "2023-03-08T15:14:34Z")

</div>

This is the version in github i am using

> **[GitHub - okta/okta-oidc-ios: Okta with AppAuth](https://github.com/okta/okta-oidc-ios#token-time-validation)**
>
> Okta with AppAuth. Contribute to okta/okta-oidc-ios development by creating an account on GitHub.

Will the id token expire in short time, like i am getting this issue in a 3hr of app inactivity. When i try to logout the app get into the failure block of oktaoidc.signout method. Not sure what is happening on the okta side. Appreciate your help

---

<div class="post-metadata">

**Author:** ![rajeshlv](https://avatars.discourse-cdn.com/v4/letter/r/ecc23a/32.png) [@rajeshlv](https://devforum.okta.com/u/rajeshlv)\
**Post date:** [March 10, 2023, 5:51am UTC](https://devforum.okta.com/t/sdk-v3-11-1-signout-method-fails-when-when-app-is-inactive-for-3-to-4-hours/23571/4 "2023-03-10T05:51:11Z")

</div>

@warren can you check if this version is still good to use. Appreciate your help

---

<div class="post-metadata">

**Author:** ![warren](https://avatars.discourse-cdn.com/v4/letter/w/97f17d/32.png) [@warren](https://devforum.okta.com/u/warren)\
**Post date:** [March 14, 2023, 4:17pm UTC](https://devforum.okta.com/t/sdk-v3-11-1-signout-method-fails-when-when-app-is-inactive-for-3-to-4-hours/23571/5 "2023-03-14T16:17:34Z")

</div>

The id token has a default lifetime of 1 hour. Maybe you can try `signOut` with `allOptions`.

> **[GitHub - okta/okta-oidc-ios: Okta with AppAuth](https://github.com/okta/okta-oidc-ios#signout)**
>
> Okta with AppAuth. Contribute to okta/okta-oidc-ios development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![rajeshlv](https://avatars.discourse-cdn.com/v4/letter/r/ecc23a/32.png) [@rajeshlv](https://devforum.okta.com/u/rajeshlv)\
**Post date:** [March 14, 2023, 4:21pm UTC](https://devforum.okta.com/t/sdk-v3-11-1-signout-method-fails-when-when-app-is-inactive-for-3-to-4-hours/23571/6 "2023-03-14T16:21:30Z")

</div>

@warren hope you are referring to this

var options: OktaSignOutOptions = .allOptions  
options.insert(.allOptions)

---

<div class="post-metadata">

**Author:** ![rajeshlv](https://avatars.discourse-cdn.com/v4/letter/r/ecc23a/32.png) [@rajeshlv](https://devforum.okta.com/u/rajeshlv)\
**Post date:** [March 15, 2023, 9:11pm UTC](https://devforum.okta.com/t/sdk-v3-11-1-signout-method-fails-when-when-app-is-inactive-for-3-to-4-hours/23571/7 "2023-03-15T21:11:39Z")

</div>

@warren this is failing for me in the sdk code  
// Access Token  
if options.contains(.revokeAccessToken) {  
progressHandler(.revokeAccessToken)  
authStateManager.revoke(authStateManager.accessToken) { (success, \_) in  
notFinishedOptions.remove(.revokeAccessToken)  
if !success {  
failedOptions.insert(.revokeAccessToken)  
}

```
            self.signOut(with: notFinishedOptions,
                         failedOptions: failedOptions,
                         progressHandler: progressHandler,
                         completionHandler: completionHandler)
        }
        
        return
    }

```

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 13, 2024, 5:17pm UTC](https://devforum.okta.com/t/sdk-v3-11-1-signout-method-fails-when-when-app-is-inactive-for-3-to-4-hours/23571/8 "2024-02-13T17:17:38Z")

</div>

Closed on February 13, 2024, 5:17pm UTC


