Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NXOAuth2Store Configuration lost after app restart #190

Open
tekatool opened this issue Aug 4, 2015 · 1 comment
Open

NXOAuth2Store Configuration lost after app restart #190

tekatool opened this issue Aug 4, 2015 · 1 comment

Comments

@tekatool
Copy link

tekatool commented Aug 4, 2015

My app creates an account successfully after OAuth2 flow.
When I stop the app and restart, it fails when I try to use NXOAuth2Request SignedURLRequest.
Looks like the config info is not persisted ?

I am using iOS 8 in simulator.

Including the trace below...Any prompt help is really appreciated...

terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'No token or no authorize URL'
*** First throw call stack:
(
0 CoreFoundation 0x000000010f248c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010fad0bb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010f248aca +[NSException raise:format:arguments:] + 106
3 Foundation 0x000000010f6e598f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 OAuth2Client 0x000000010f0e1788 -[NXOAuth2Client initWithClientID:clientSecret:authorizeURL:tokenURL:accessToken:tokenType:keyChainGroup:keyChainAccessGroup:persistent:delegate:] + 600
5 OAuth2Client 0x000000010f0cd5d8 -[NXOAuth2Account oauthClient] + 1000
6 OAuth2Client 0x000000010f0d72df -[NXOAuth2Request signedURLRequest] + 303
7 OAuthTestApp1 0x000000010dd52164 -[TestPRWebViewController buildRequest] + 500

Thanks

@toto
Copy link
Contributor

toto commented Aug 23, 2015

The only thing that is persistent are the access tokens (in the keychain). You need to make the calls to NXAccountStore each time the app starts before anything. I recommend doing that in +initialize of your app delegate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants