Skip to content
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

Recaptcha (and therefore signup) is not yet working on the brand new server #25

Closed
ryancwalsh opened this issue Feb 28, 2022 · 2 comments
Assignees

Comments

@ryancwalsh
Copy link

To Reproduce
Steps to reproduce the behavior:

  1. Visit https://near-academy-frontend-tfyr.onrender.com/
  2. Click on 'Sign up'
  3. Try to sign up as a new user (with a username starting with "test_")
  4. See error in Chrome developer tools {"error":"Wrong re-captcha token"} (and also a toast error about it)

Desktop (please complete the following information):

  • OS: Mac
  • Browser: Chrome

Additional context
See also #17 (comment)

@ryancwalsh
Copy link
Author

@oceanByte I made some progress but still haven't gotten signup working.

I'm pretty sure I needed to set up our own Google reCAPTCHA v3 for our onrender domain.

So I did this at https://www.google.com/recaptcha/admin/site/514289692/settings:

image

And I put the site key into the REACT_APP_RECAPTCHA_SITE_KEY of the frontend .env and the secret in the RECAPTCHA_SECRET_KEY of the API project .env and redeployed each.

(See 020915e)

But still, when I try to sign up at https://near-academy-frontend-tfyr.onrender.com/, I get error:

{"error":"Wrong re-captcha token"}

If you have suggestions about what to explore, I'd appreciate them.

Also interesting: https://near-academy-frontend-tfyr.onrender.com/sign-up (if I visit it directly) shows Not Found but if I visit https://near-academy-frontend-tfyr.onrender.com and then click Sign Up, the page loads fine. That direct route works fine at https://near.academy/sign-up (on your old server). I'm not sure yet what the root cause is.

@ryancwalsh ryancwalsh self-assigned this Feb 28, 2022
@ryancwalsh
Copy link
Author

Ahh, in the env variables at:
https://dashboard.render.com/static/srv-c8eg854objd6b711pkcg/env
https://dashboard.render.com/web/srv-c81d23rvog4kd0lhrqrg/env
I just changed the URLs to point to each other at the onrender domains rather than the production domains.

Then signup worked. I signed up as test_newRenderFE. Apparently the username then got stored as lowercase, so searching for {username:"test_newrenderfe"} at https://cloud.mongodb.com/v2/6202c6f76dc24766a87e17e3#metrics/replicaSet/6214f248b64d8728415f1b40/explorer/nearacademy/users/find found my user. 👏

And then I changed those env values back to use the production domain (https://near.academy and https://api.near.academy) to be ready for #17.

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

1 participant