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

Example snippet for creating an authentication module #96

Open
alexrwegener opened this issue Jul 11, 2014 · 3 comments
Open

Example snippet for creating an authentication module #96

alexrwegener opened this issue Jul 11, 2014 · 3 comments

Comments

@alexrwegener
Copy link

I'm trying to create a scope for objects that require an authenticated user. Basically in the same manner that is described in the readme.

Maybe a scope is associated with a particular view, or maybe it isn't. For example, an app might have a top level global scope that allows the injection of fundamental services; a child of that which manages objects that require an authenticated user; children of them for each Activity; and children of the activity scopes for their various screens and regions.

This issue however is that authentication requires access to the activity lifecycle (Facebook SDK) and should be run before FlowOwner presenter (from the sample). Any ideas on how to wire something like this up?

If this isn't the appropriate place to post let me know and I'll close and post on SO.

Thanks!

@rjrjr
Copy link
Collaborator

rjrjr commented Jul 11, 2014

I'm supposed to tell you to use StackOverflow for this kind of question, but I keep forgetting to monitor that so nevermind.

Notice that the V in Presenter<V> isn't tied to the Android View class. We have a lot of places where we share activity services with the rest of the application via a SomePresenter<A>, where A is an interface implemented by the Activity itself. Off the top of my head, something like that could be tied to the Facebook SDK, and be written not to show a view with a FlowOwner presenter until the coast is clear.

Can't promise to write a sample of this kind any time soon. This issue seems worth keeping open as a reminder that it would be a good idea. Really, a Facebook SDK sample specifically would be pretty popular.

@AlexKorovyansky
Copy link

+1 for adding Facebook SDK sample. It have to be very useful!

@fredgrott
Copy link

I have to tackle it with the app I am porting so I may get there before you do

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

4 participants