-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Firebase authentication provider is implemented #3174
Conversation
@mockitor updated the pull request - view changes |
In general, while this is very interesting, this has a strong dependency on firebase-admin. Which is not required for all users. We try to minimize the amount of direct dependencies on that repository. So, probably you would want to make that dependency an optional one or even better, provide this authentication through a 3rd party package that a user can configure:
See: I'm planning to refactor the auth layer through proper adapters to match the overall architecture. |
@@ -0,0 +1,41 @@ | |||
// Helper functions for accessing the qq Graph API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bad comment.
var Parse = require('parse/node').Parse; | ||
var admin = require("firebase-admin"); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove empty line
}); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove empty line
}).catch(function (error) { | ||
throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, error.message); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove empty line
return Promise.resolve(); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove empty line
@@ -13,6 +13,8 @@ let vkontakte = require("./vkontakte"); | |||
let qq = require("./qq"); | |||
let wechat = require("./wechat"); | |||
let weibo = require("./weibo"); | |||
let firebase = require("./firebase"); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove empty line
@@ -23,6 +23,7 @@ | |||
"commander": "2.9.0", | |||
"deepcopy": "0.6.3", | |||
"express": "4.14.0", | |||
"firebase-admin": "^4.0.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure we want to depend on that module for every single user.
You can probably provide that module externally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, i'll try to provide externally. thanks for your feedback.
would be good if i could find an eslint rule for the blank line formatting stuff.... http://eslint.org/docs/rules/no-multiple-empty-lines that seems too lienent, but having max at 1 would likely be too strict. |
@mockitor We've merged the refactoring for the adapter loading, providing your adapter externally should be as easy as
That's easy enough to implement, what do you think? |
Firebase id token verification is implemented with third part jsonwebtoken library.
@mockitor updated the pull request - view changes |
i could not find any simple example to implement auth adapter. instead of i've removed firebase-admin-sdk. Firebase Id token is verified against Google Public key using jsonwebtoken jwt library. only jsonwebtoken library is extra dependency now. |
The point was that this auth adapter can and should be distributed as it's own npm package (as we do for the push adapters for example) |
Closing as we're prefer to see that distributed as it's own node module, if you need help on that ping me :) |
Hi @flovilmart- I can create it as external module. Can you please create a repository under parse-server-modules? I will find some time to do it later this week or next week. @mockitor - I will try to use your code first and will let you know if there are issues. Thanks. |
No description provided.