nickredmark / staart

A starter library for node projects with user accounts.
MIT License
313 stars 39 forks source link

Having trouble getting staarted. Registration not working. Forbidden #23

Closed Tzikas closed 6 years ago

Tzikas commented 6 years ago

Getting POST http://localhost:3000/auth/local/register 400 (Bad Request) When trying to register.

Also seeing this when the register page is loaded. Not sure if it's related.


M @ 3723580519-idpiframe.js:49
wb @ 3723580519-idpiframe.js:49
(anonymous) @ 3723580519-idpiframe.js:72
(anonymous) @ 3723580519-idpiframe.js:55
h.getItem @ 3723580519-idpiframe.js:35
Q.o @ 3723580519-idpiframe.js:55
Rb @ 3723580519-idpiframe.js:67
ec @ 3723580519-idpiframe.js:71
h.yb @ 3723580519-idpiframe.js:74
(anonymous) @ 3723580519-idpiframe.js:83
Jb.Cb @ 3723580519-idpiframe.js:63
b @ 3723580519-idpiframe.js:73
login-google.js?b2be859:73 error {error: "idpiframe_initialization_failed", details: "Not a valid origin for the client: http://localhos…itelist this origin for your project's client ID."}```

Does this have something to do with ooth ?  Tried adding the clientId in my google dev console and that worked for part of it, but still couldn't figure out the whitelist part, even though I added it into my whitelist options on console.developers.google.com 

```"Not a valid origin for the client: http://localhost:3000 has not been whitelisted for client ID XXX. Please go to https://console.developers.google.com/ and whitelist this origin for your project's client ID."```
Tzikas commented 6 years ago

Actually, although the registration says "Forbidden" when I click Register I do see the user document in my local mongo. I am also able to log in. So it does seem to work.

nickredmark commented 6 years ago

Yes, I run into the same problem. You need to remove the mailgun object from settings.js. I updated the readme but you had probably already cloned the example.

nickredmark commented 6 years ago

I mean, remove it only if you don't want to support email :)

nickredmark commented 6 years ago

In other words, it fails when trying to send registration and welcome emails.