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

Gmail Activation Link getting expried after 1sec #7

Open
Nithishkumarr opened this issue Jul 3, 2023 · 5 comments
Open

Gmail Activation Link getting expried after 1sec #7

Nithishkumarr opened this issue Jul 3, 2023 · 5 comments

Comments

@Nithishkumarr
Copy link

Gmail Activation Link getting expried after 1sec

I Downloaded [https://github.com/shahriarsajeeb/Eshop-tutorial/tree/4ce1ebd71ed57b8a25d7bddcc227f447d684d1e7 ] st commit add add my mongoURl ,SMPT_MAIL,SMPT_PASSWORD and run the front end and backend there is no error in console
in localhost:3000/sign-up url after filling form Iam getting activation token in provided mail and when i click that I got
Your account has been created suceessfully! and after 1 sec it changes to Your token is expired! and got internal sever error status code 500
I have attached Screen shot of that so please help @shahriarsajeeb

error500


@bhupenjp
Copy link

bhupenjp commented Jul 5, 2023

i have a same problem.plz help us.

@Nithishkumarr
Copy link
Author

i have a same problem.plz help us.

ya I same here I clone the 1st commit then also getting same error

@AdelakunShola
Copy link

Were you able to fix it, i have same issue.

@Jerald13
Copy link

Jerald13 commented Feb 2, 2024

I fixed. My issues was the model folder user.js did not implement

const jwt = require("jsonwebtoken")  

// jwt token
userSchema.methods.getJwtToken = function () {
  return jwt.sign({ id: this._id }, process.env.JWT_SECRET_KEY, {
    expiresIn: process.env.JWT_EXPIRES,
  })
}

@Somto-ob
Copy link

I fixed. My issues was the model folder user.js did not implement

const jwt = require("jsonwebtoken")  

// jwt token
userSchema.methods.getJwtToken = function () {
  return jwt.sign({ id: this._id }, process.env.JWT_SECRET_KEY, {
    expiresIn: process.env.JWT_EXPIRES,
  })
}

How did you fix it. My code looks the same as yours but I am still having the issue

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

5 participants