openid / AppAuth-iOS

iOS and macOS SDK for communicating with OAuth 2.0 and OpenID Connect providers.
https://openid.github.io/AppAuth-iOS
Apache License 2.0
1.72k stars 744 forks source link

authState as a property of AppDelegate #849

Open ronnybremer opened 2 months ago

ronnybremer commented 2 months ago

According to the documentation, the "containing" class should have this property added:

// property of the containing class
private var authState: OIDAuthState?

The currentAuthFlow property is supposed to be in the AppDelegate.

In order to automatically use refresh tokens before expiry, I need to wrap my Rest calls using the authState property from above. However, those classes don't have access to the login/logout view controller. Can I safely move the property to the AppDelegate as well or are there any hidden issues I am not aware of in doing so?