Validation email and Magic Link errors in generated app
scattered-development opened this issue · 4 comments
details below - I am assuming that these are intended to work out the box, is that correct?
Two similar issues that might be better separate but documenting as one for now in case the root is the same
I can look to fix during the week any pointers appreciated.
Validation Email
validation doesn't work, get error in browser and a 404 for the request in the backend logs
I tried logging in as two other users (one admin one normal) and noted that the email in the is always the same and that of the first super user.
Validation error
Please check your email and try again.
172.21.0.7:33442 - "POST /api/v1/login/oauth HTTP/1.1" 200
2024-07-21 19:27:54 INFO 172.21.0.7:33442 - "OPTIONS /api/v1/users/ HTTP/1.1" 200
2024-07-21 19:27:54 INFO 172.21.0.7:33442 - "GET /api/v1/users/ HTTP/1.1" 200
2024-07-21 19:28:02 INFO 172.21.0.7:38152 - "OPTIONS /api/v1/users/send-validation-email HTTP/1.1" 200
2024-07-21 19:28:02 INFO 172.21.0.7:38152 - "POST /api/v1/users/send-validation-email HTTP/1.1" 404
MAGIC LINK
It seems that the tokens are not present client side
The magic link email is sent but pasting into browser returns a bad request due to missing port adding port :3000 takes me to page magic page where I get a front end error and a 403 in the backend
EDIT - I forgot I have edited the email client and need to check that as the cause
Login error
Ensure you're using the same browser and that the token hasn't expired
"POST /api/v1/login/claim HTTP/1.1" 403
Fixed
Turns out the error is due to the payload types; the keys are of type string but the Model expects ObjectId. Fixing this sorts out the validation link as well. Again, can create a PR if wanted.
incorrect email in form on screen but guessing this is just incomplete nature of a template - if you want that updating as well let me know
Hi @scattered-development, yes, please create a PR!
PR here sorry for delay #53
PR Merged!
