-
Notifications
You must be signed in to change notification settings - Fork 249
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
Cannot get github auth working #135
Comments
This error usually happens when
|
@daffl thank you for the fast reply! It turns out that GH auth is actually working. As you pointed out, the issue is that my GH profile is not providing my email in the response. I have my email set to private - perhaps that's why. The error is coming from the call to |
In that case the code from customizing the service has to be adjusted to work with the data you are getting. Simplest would be to only use the exports.Users = class Users extends Service {
create (data, params) {
// This is the information we want from the user signup data
const { githubId } = data;
// The complete user
const userData = {
githubId
};
// Call the original `create` method with existing `params` and new data
return super.create(userData, params);
}
}; |
thanks! That's what I was about to do. I first confirmed that the private email was, in fact, the issue. |
I carefully followed the getting started guide all the way through - stopping at the writing tests section. I'm hung up on getting github auth to work. I've added the oath app to GH and update the authentications section of default.json. Logging into GH is working and I get the permissions grant screen. Preceding past the that, based on the guide, I expected to be logged into the chat app after authenticating to github.
However, I keep getting redirected to the chat login page. The error that occurs immediately after the permission grant is:
Cannot read property 'toLowerCase of null
Here's a screenshot of this after the github permissions grant: https://www.evernote.com/l/ADqsa_P7jj1Ly5YVahH5b4LMbDKTgBX3CEU
Here's the error and stack trace I get on all consecutive attempts to login with githib:
https://www.evernote.com/l/ADq81BrDFOxHx4lLuGKQwt88X_VkvzZYr7k
Here are the auth parts from default.json
"authentication": {
"oauth": {
"redirect": "/",
"github": {
"key": "hidden",
"secret": "hidden"
}
},
"entity": "user",
"service": "users",
"secret": "wplCi9j8gbUzXjBCoP3NGJzGUN8=",
"authStrategies": [
"jwt",
"local"
],
Is there something missing from the quick-start? Perhaps another config setting to enable github?
System configuration
Mac
chrome 81.0.4044.92
node 8.12
"dependencies": {
"@feathersjs/authentication": "^4.5.3",
"@feathersjs/authentication-local": "^4.5.3",
"@feathersjs/authentication-oauth": "^4.5.3",
"@feathersjs/configuration": "^4.5.3",
"@feathersjs/errors": "^4.5.3",
"@feathersjs/express": "^4.5.3",
"@feathersjs/feathers": "^4.5.3",
"@feathersjs/socketio": "^4.5.3",
"@feathersjs/transport-commons": "^4.5.3",
"compression": "^1.7.4",
"cors": "^2.8.5",
"feathers-nedb": "^5.1.0",
"helmet": "^3.22.0",
"nedb": "^1.8.0",
"serve-favicon": "^2.5.0",
"winston": "^3.2.1"
},
The text was updated successfully, but these errors were encountered: