-
Notifications
You must be signed in to change notification settings - Fork 476
Google Auth Causes Internal Error On Callback #350
Comments
same here |
Same here |
Moi aussi :-( |
same here |
Thanks for your patience everyone. I just emailed @AndrewWalsh and asked if he could take a look at this issue. He knows Mail for Good better than anyone, and did most of the initial development. I personally have been using Mail for Good each week for my email blast to ~3 million subscribers, and haven't had any problems with authentication. But if it is affecting you all, we are going to look into this and try and fix it as quickly as possible. |
Dear @QuincyLarson , thank you very much for your involvement!!! I actually managed to reach out to @Asjas , who has been recently in charge of the Mail for Good. He has been kind enough to do a research, which shown the nature of the problem to be in recent (March 2019) discontinuation of Google+ API. In the same time he noticed that local auth doesn't work with no clear reason. I believe the information he discovered if passed to @AndrewWalsh might be useful and shorten the research time for him. Looking forward hearing from you! |
Turns out, we need to do some housekeeping on the dependencies, I was able to patch some of the most critical ones, that were breaking Passport's parsing strategy as fixed wayback here: jaredhanson/passport-google-oauth2@039a31d If anyone is willing to test the fix in the linked PR, here are the steps: git clone https://github.com/freeCodeCamp/mail-for-good
git checkout fix/auth
npm install
docker-compose up |
@raisedadead I tried out the fix/auth branch with no success. I modified the docker-compose.yml to have the image built from source instead of pulling but I ran into an error upon npm install with the bcrypt dependency. This seems to be due to the fact that the project is using an older version of node (8.2.1) so I went ahead and rebuilt using node version 10.21.0. This did allow the image to be built but I got the following runtime error :
What version of node are you successfully running this on? Anything else I can try? Would also love to know if there are any updates from @QuincyLarson or @AndrewWalsh. |
Ah - that's a bummer. I used node 8. Can you try git clone https://github.com/freeCodeCamp/mail-for-good
git checkout fix/auth
npm ci
docker-compose up If that doesn't work, let me know I will try and investigate. |
@raisedadead Hey just to be clear I'm trying to run the app within a docker container so whatever npm command you are telling me to run, I am adding to the Dockerfile. I don't think this should make a difference but maybe I should try running the app outside Docker. My problem is I already have an another app installed on my machine that requires a more recent version of node so I really think Docker is my best option. Anyways I did try adding npm ci to the Dockerfile and got the same error when trying to install bcrypt:
|
Ah - that's probably why its been breaking for you. If you want to re-use the same machine with Node defaulting to another version, I would recommend using cd mail-for-good
nvm use 8 Then follow the steps outside the container. Which will still run MFG in docker but be able to use the patch. If you look at the source for the Dockerfile it doesnt do much: Lines 1 to 13 in dc946e2
|
That said, the node-gyp error might need some build tooling unlreated to MFG's code itself. This can vary depending on the OS you are on. On macOS its Xcode Commandline Tools, on ubuntu its probably we can dig deeper into that if it does not work for you. |
Thanks for taking the time to answer all my questions. So I tried installing node 8 with nvm and after successfully installing the bcrypt module outside the docker container I run into the same error during npm install inside the docker container. I'm on Ubuntu and I do have build-essential installed. After checking the bcrypt package page it says the compatibility for node 8 is >= 1.0.3 < 4.0.0. Strangely enough though I am able to install the package fine outside of docker while using node 8. |
Okay seems like you are getting there. Maybe instead of using the |
Tried node:8.2.1-alpine. Running into an issue because since babel-cli and other dependencies are not installed in the container, it can't run the node-babel command. Furthermore if I try adding npm install babel-cli to the Dockerfile I run into cascading errors of dependencies not being installed every time I add the error-triggering dependency to the Dockerfile. |
I get the same error still, anyone managed to get this working:
I believe this is related to DeprecationWarning above, if some one can have a look, would be great |
I just fixed this issue, took me the good part of today, First is that the docker images wont work, The issue is cause d by google removing the old Google+ OAuth Method in favor of google sign-in You will need to follow the development setup to get it working and make some modifications to the code STEP1 follow the guide here https://github.com/freeCodeCamp/Mail-for-Good/wiki/Setup-for-development STEP2 this repo has updated code to fix this issue https://github.com/isholaomotayo/mail-for-good?organization=isholaomotayo&organization=isholaomotayo I am creating a pull request also Once this is done your app should run as expected. You may also need ot enable the google people API |
I used to have a working MFG instance. I've always kept it up and a few months ago when I tried to log in it threw an internal error on the /auth/google/callback page after going through Google sign in.
Here is my exact .env file:
The logs in docker show this:
Finally here is the configuration of my oAuth Client:
Google+ API is obviously enabled. I have tried creating other oAuth Clients, even trying on an other Google account and I cannot for the life of me figure out what is wrong.
The text was updated successfully, but these errors were encountered: