Skip to content

OAuth based login #241

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

Closed
flovilmart opened this issue Feb 4, 2016 · 8 comments
Closed

OAuth based login #241

flovilmart opened this issue Feb 4, 2016 · 8 comments

Comments

@flovilmart
Copy link
Contributor

I have some code that's been originally written for could code for OAuth2 providers, it needs a refactor as it was using an external object to store the login informations.
I have the basic implementations for instagram, meetup, linkedin, as well as the iOS side.
Twitter login could also be added in that, but since it's OAuth 1.1 that's a totally different game.

@gfosco is it something you'd like to see integrated soon or you prefer to wait for stabilization?

@gfosco
Copy link
Contributor

gfosco commented Feb 4, 2016

That would be great, don't think we need to wait. Looks like most of the work is in RestWrite.js.

@flovilmart
Copy link
Contributor Author

I investigated already, I believe I'll start with OAuth2 flows, in an extensible way.
Quick architectural question, are the ParseServer options exposed in the RestWrite?

@flovilmart
Copy link
Contributor Author

@gfosco I could also refactor the Facebook login around this new OAuth provider as they will share 99% of the code, what do you think?

@nlutsenko
Copy link
Contributor

That's an awesome idea!
And the SDKs are already built in a way that can support this.

One of the potential ways for building this could be via custom cloud functions or similar piece, so anyone can bring in their own validation.

Look into how Facebook is hooked on right now - all of this could be similar, where we would store the data in _User.

@nlutsenko nlutsenko mentioned this issue Feb 5, 2016
@flovilmart
Copy link
Contributor Author

@nlutsenko the PR is open with meetup, instagram, and linked in. I didn't realize initially that the full oAuth flow is not provided by parse-server itself so adding twitter would be just another validator.

We could also support custom validator through:

{
   appId: ...
   oauth: {
        customProvider: {
            validateUserId:function(userId, token) { /*code */ },
            validateAppId: function() { /* code */}
        }
   }
}

This could be added before tomorrow

@gfosco
Copy link
Contributor

gfosco commented Feb 16, 2016

This will be landing in #247. 🎆

@gfosco gfosco closed this as completed Feb 16, 2016
@sprabs
Copy link

sprabs commented Jul 12, 2016

Quick question for you all (since you implemented this). We have two Twitter apps (one our iOS clients are using and one that our Android clients are using). How do we specify two sets of keys in index.js?

#2254

@flovilmart
Copy link
Contributor Author

It isn't supported yet

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