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

What about auth with facebook, Twitter, etc? #2

Closed
faceyspacey opened this issue Feb 26, 2016 · 9 comments
Closed

What about auth with facebook, Twitter, etc? #2

faceyspacey opened this issue Feb 26, 2016 · 9 comments

Comments

@faceyspacey
Copy link

The react native simple auth package works well, perhaps it's just a matter of gathering the information received from it and passing it over DDP.

@spencercarli
Copy link
Owner

Would be something interesting! I'm not sure how oauth via Meteor works so I would have to do some digging.

I'm not sure that it would live in this repo or if it would be part of a ddp client module that we use in this repo. Regardless, it's on my radar! Thanks for opening the issue.

@josephdburdick
Copy link
Contributor

I'm also very curious about these oauth topics.

@ghost
Copy link

ghost commented Mar 2, 2016

+1

@duataud
Copy link

duataud commented Mar 7, 2016

Maybe this could help but I can't integrate it. I hope you can. martijnwalraven/meteor-ios#10

@spencercarli
Copy link
Owner

Hey all - I just wanted to drop a quick update regarding this. I've worked on Google Oauth for a client and am working on turning my learnings into a blog post. It's turned into a monster of a blog post and I'm running into some issues with Android (Android is still very foreign to me) so it may take a little bit longer.

If you're interested the repo is here: https://github.com/spencercarli/react-native-meteor-google-oauth

There's no specific documentation there - that will all come with the blog post. But if anyone is blocked and waiting to see how it can be done then maybe looking at the source code of that repo may help.

I hope to have the detailed blog post out soon!

@faceyspacey
Copy link
Author

nice!

...lookin at: https://github.com/spencercarli/react-native-meteor-google-oauth/blob/dcb3c3f891795fad95a4e4bede5e0525756c42f9/RNApp/app/ddp.js#L97

it seems you use the same google auth request for both login and signup? I only ask because the signup method doesn't exist and I've done the same thing, i.e. just one button for both signup and login. I'm assuming you did that for initial demonstration purposes.

...I'm about to implement this for Twitter, so it seems as far as interfacing with Meteor, you just have to get the params correct--would you say that's the case? What are the params exactly?

let params = { 
   twitter: {
      ???: '???',
      ???: '???',
      ???: '???',
   } 
};

Last thing: my plan is to use this multi-auth react native package to get the tokens: https://github.com/adamjmcgrath/react-native-simple-auth

it seems that if we plugged this in, we could get a bunch of auths all at once. Do you think it's as simple as using that, getting the correct tokens, and then passing them to ddpClient.call("login", ??

@spencercarli
Copy link
Owner

You're correct that it uses the same method for sign up and login. That's the pattern I saw with the meteor core packages and seems to be the norm with oauth. You can see how I'm looking up if a user exists from the meteor package.

I'm not sure what all would be needed for Twitter but I would suggest reviewing source for the accounts-twitter and the twitter as well as reading the official Twitter docs.

react-native-simple-auth looks nice and I definitely want to do some deeper research into it. The other major oauth providers are on my list to do further research and document how to get them set up but I don't have a timeline for that yet.

@chrbradley
Copy link

@faceyspacey are you using https://github.com/adamjmcgrath/react-native-simple-auth yet? Just curious how you're managing the configuration object.

Any concerns with sending secrets to the device?

@spencercarli
Copy link
Owner

Oauth with facebook: https://medium.com/@spencer_carli/react-native-meteor-oauth-with-facebook-3d1346d7cdb7#.pnzlwbt76

Due to the complexities involved with setting up the native dependencies it is not something I'll be adding to the boilerplate.

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

5 participants