# Functionality of Okta framework for iOS does not match documentation

**URL:** <https://devforum.okta.com/t/functionality-of-okta-framework-for-ios-does-not-match-documentation/802>\
**Category:** OAuth/OIDC\
**Tags:** ios\
**Created:** [November 23, 2017, 2:53pm UTC](https://devforum.okta.com/t/functionality-of-okta-framework-for-ios-does-not-match-documentation/802 "2017-11-23T14:53:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dfelber](https://avatars.discourse-cdn.com/v4/letter/d/f475e1/32.png) [@dfelber](https://devforum.okta.com/u/dfelber)\
**Post date:** [November 23, 2017, 2:53pm UTC](https://devforum.okta.com/t/functionality-of-okta-framework-for-ios-does-not-match-documentation/802/1 "2017-11-23T14:53:22Z")

</div>

I found following section in the iOS quickstart guide of the [documentation](https://developer.okta.com/quickstart/#/ios/nodejs/express):

> When starting up the application, check for the existance of an access\_token to see if the user has an existing session:

```
if let currentToken = OktaAuth.tokens.get(forKey: "accessToken") {
  // Token is valid!
} else {
  // Token does not exist, prompt the user to login.
}

```

The first problem is, that `OktaAuth.tokens` is of the type `OktaTokenManager?` =\> the example code would be wrong and needs to be something like this:

```
if let currentToken = OktaAuth.tokens?.get(forKey: "accessToken") {
  // Token is valid!
} else {
  // Token does not exist, prompt the user to login.
}

```

The second problem is, that the version with the optional `OktaTokenManager` will also not work as described in the documentation, because `OktaAuth.tokens` is never set when you don’t perform a login first. (And according to the documentation that unnecessary login call could be prevented by the check for an existing accessToken)

* * *

So here my questions:

- Is the documentation out of date?
- Did I use the API of the framework wrong?

* * *

I integrated v0.1.1 of OktaAuth via Cocoapods. So it should be the newest version available.

---

<div class="post-metadata">

**Author:** ![jmelberg](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/jmelberg/32/154_2.png) [@jmelberg](https://devforum.okta.com/u/jmelberg)\
**Post date:** [November 27, 2017, 5:58pm UTC](https://devforum.okta.com/t/functionality-of-okta-framework-for-ios-does-not-match-documentation/802/2 "2017-11-27T17:58:44Z")

</div>

Hi @dfelber,

Great catch. Currently, there is no easy way to manage a User’s session based on the exposed methods. I’ve created an issue on GitHub for the SDK [here](https://github.com/okta/okta-sdk-appauth-ios/issues/21), so we can track the progress.

In the interm, I’ve updated the [quickstart documentation](https://developer.okta.com/quickstart/#/ios/nodejs/express) as we resolve this.

---

<div class="post-metadata">

**Author:** ![Kevin](https://avatars.discourse-cdn.com/v4/letter/k/2acd7d/32.png) [@Kevin](https://devforum.okta.com/u/Kevin)\
**Post date:** [December 11, 2017, 7:27pm UTC](https://devforum.okta.com/t/functionality-of-okta-framework-for-ios-does-not-match-documentation/802/3 "2017-12-11T19:27:22Z")

</div>

Is there an ETA on when this will get fixed? This is a big issue if a user has to login every time the app opens (especially when developing you have to rebuild the app every time you make a change). Or is there a way to work around this in the mean time?

---

<div class="post-metadata">

**Author:** ![dfelber](https://avatars.discourse-cdn.com/v4/letter/d/f475e1/32.png) [@dfelber](https://devforum.okta.com/u/dfelber)\
**Post date:** [January 16, 2018, 8:51am UTC](https://devforum.okta.com/t/functionality-of-okta-framework-for-ios-does-not-match-documentation/802/4 "2018-01-16T08:51:08Z")

</div>

I’m wondering if anyone is actually working on the iOS and Android frameworks.  
There is no progress for months.

---

<div class="post-metadata">

**Author:** ![tom](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/tom/32/24_2.png) [@tom](https://devforum.okta.com/u/tom)\
**Post date:** [January 16, 2018, 4:15pm UTC](https://devforum.okta.com/t/functionality-of-okta-framework-for-ios-does-not-match-documentation/802/5 "2018-01-16T16:15:11Z")

</div>

There is progress, I think looking at a single git repo is a little unfair though. The team owns a lot of different repos across web and mobile. Sometimes we see a problem, and we need to build in another area to fix the original problem. ID Token validation was a little bit more important for us to concentrate our efforts on and we released a spec compliant library: [https://github.com/okta/okta-ios-jwt](https://github.com/okta/okta-ios-jwt)

Probably a little too much information, but I wanted to be clear about what we have been working on. We are working on a better way to describe timelines for features and issues in github so we have a simple way for our customers to figure timelines out on their own.

For this issue, in particular, this is slated for mid feb.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [January 12, 2024, 10:02pm UTC](https://devforum.okta.com/t/functionality-of-okta-framework-for-ios-does-not-match-documentation/802/6 "2024-01-12T22:02:44Z")

</div>

Closed on January 12, 2024, 10:02pm UTC

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
