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

Fix permission on relog #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lysanntranvouez
Copy link

Previously the permissionGranted attribute was set only in userAuthorizationURLWithRequestToken:requestedPermission:. But this method is not called when using checkAuthorizationOnCompletion:. Thus, requests that require write or delete permission failed when using a token from a previous authentication procedure.

This pull request stores the grantedPermission attribute along with the auth token in the NSUserDefaults, and restores it when checkAuthorizationOnCompletion: succeeds.

…letion:

Previously the permissionGranted attribute was set only in userAuthorizationURLWithRequestToken:requestedPermission:. But this method is only called by the initial authorization procedure (where the user is asked for permission) initiated by beginAuthWithCallbackURL:permission:completion:. It is not called when using checkAuthorizationOnCompletion:.
This commit stores the grantedPermission attribute along with the auth token in the NSUserDefaults, and restores them when checkAuthorizationOnCompletion: succeeds.
… using stringForKey: and objectForKey: and removeObjectForKey:
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

Successfully merging this pull request may close these issues.

1 participant