Skip to content

Add ability to manually login with auth token, and decoupled shared singleton with internals#42

Open
mwaterfall wants to merge 3 commits intodevedup:masterfrom
mwaterfall:master
Open

Add ability to manually login with auth token, and decoupled shared singleton with internals#42
mwaterfall wants to merge 3 commits intodevedup:masterfrom
mwaterfall:master

Conversation

@mwaterfall
Copy link

These changes allow me to manage multiple Flickr accounts within one app, and removing any shared dependencies. The default behaviour has not been changed, and the only public changes are:

Allow someone to manually log in with their own token:

- (void) loginWithAuthToken:(NSString *)authToken authSecret:(NSString *)authSecret;

And disable persisting of auth token when completing auth, to allow someone to manually grab the tokens after auth is completed and store them how they wish:

- (FKDUNetworkOperation *) completeAuthWithURL:(NSURL *)url completion:(FKAPIAuthCompletion)completion; // Default behaviour retained and token is persisted to user defaults
- (FKDUNetworkOperation *) completeAuthWithURL:(NSURL *)url saveAuthTokenToUserDefaults:(BOOL)persistAuthToken completion:(FKAPIAuthCompletion)completion;

This can be useful if multiple isolated instances of FlickrKit need to be used when managing multiple accounts in a single app.
…rsist token to user defaults with completing auth.

This change does not affect normal use of FlickrKit and the default behavior is retained.
It conflicted with other install of Tony Million's Reachability (TMReachability)
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