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

Resend OTP feature #325

Closed
2 tasks
rajdip-b opened this issue Jul 6, 2024 · 14 comments
Closed
2 tasks

Resend OTP feature #325

rajdip-b opened this issue Jul 6, 2024 · 14 comments
Assignees
Labels
difficulty: 3 foss hack Clustering all the curated issues for Foss Hack 2024 good first issue Good for newcomers help wanted Extra attention is needed priority: high scope: api Everything related to the API scope: platform Everything related to the keyshade platform package type: feature Release drafter tag for tagging PRs related to adding new features

Comments

@rajdip-b
Copy link
Member

rajdip-b commented Jul 6, 2024

Description

image

We need to come up with an implementation to resend the OTP to the users. The resend functionality should have a timeout of 1 minute.

Solution

General Note: This is a join issue, so this ticket will be considered as completed only if both the issues are marked as complete.
Note for FOSS Hack: We saw a few requests for team collaboration. We feel that this would be the best place to do so!

@rajdip-b rajdip-b added good first issue Good for newcomers help wanted Extra attention is needed scope: api Everything related to the API type: feature Release drafter tag for tagging PRs related to adding new features scope: platform Everything related to the keyshade platform package priority: high foss hack Clustering all the curated issues for Foss Hack 2024 difficulty: 3 labels Jul 6, 2024
@harshdeshmukh21
Copy link

I would like to contribute to this project. I feel I can do this task according to the need. I have registered my team via Foss Hack.

@rajdip-b
Copy link
Member Author

Hey @harshdeshmukh21! Thanks for showing interest in this issue, but unfortunately this is already assigned. If you still want to contribute to this, I would recommend you to have a chat with the assigned members in the sub issues.

Alternatively, your team can pick up any of the other issues.

@Prakhargarg-2010196
Copy link
Contributor

@rajdip-b I am taking this entire thing hope so it wouldn't be an issue will be back in few days with some solution?

@rajdip-b
Copy link
Member Author

Yeap thats fine!

@Prakhargarg-2010196
Copy link
Contributor

Prakhargarg-2010196 commented Sep 14, 2024

@rajdip-b Why do we use params for sending data to api/send-otp/:email and not POST body?

@rajdip-b
Copy link
Member Author

There's no reason to be very honest. We could have used request body, but we didn't.

  • Is it anti-pattern? Yes.
  • Is it causing a lot of trouble? No.
  • Is it exposing sensitive data? No (i believe)

@Prakhargarg-2010196
Copy link
Contributor

There's no reason to be very honest. We could have used request body, but we didn't.

  • Is it anti-pattern? Yes.
  • Is it causing a lot of trouble? No.
  • Is it exposing sensitive data? No (i believe)

Okay @rajdip-b I am following the same in resend otp, one thing more when do i have to run migrations in prisma like I am trying to utilise the existing logic of the sendOtp service by calling it in the resendOtp function but its showing some prisma issues..

@rajdip-b
Copy link
Member Author

Until and unless you modify schema.prisma, you don't need to run migrations. But when you do, you need to run pnpm db:generate-migrations.

Whether you run migrations or not, you would need to run pnpm db:generate-types so that typescript can infer the types.

And lastly, you would be deploying the migrations using pnpm db:deploy-migrations in the following cases:

  • You have set up the code for the first time
  • You have taken a pull that contains new migrations
  • You have generated a migration by yourself.

@Prakhargarg-2010196
Copy link
Contributor

This can be closed i guess now @rajdip-b

@rajdip-b
Copy link
Member Author

rajdip-b commented Nov 3, 2024

Could you please link the pr here? I think we missed it

@Prakhargarg-2010196
Copy link
Contributor

Could you please link the pr here? I think we missed it

The related issues of this PR are solved @rajdip-b can check.

@rajdip-b
Copy link
Member Author

rajdip-b commented Nov 4, 2024

Yes, I'm asking for that PR link. Because i think it was not linked to the issue. I'll link it and close the issue

@Prakhargarg-2010196
Copy link
Contributor

Yes, I'm asking for that PR link. Because i think it was not linked to the issue. I'll link it and close the issue

I don't think so the combined PR exists but the Related PR are
#445 and #489

@rajdip-b
Copy link
Member Author

rajdip-b commented Nov 4, 2024

@rajdip-b rajdip-b closed this as completed Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: 3 foss hack Clustering all the curated issues for Foss Hack 2024 good first issue Good for newcomers help wanted Extra attention is needed priority: high scope: api Everything related to the API scope: platform Everything related to the keyshade platform package type: feature Release drafter tag for tagging PRs related to adding new features
Projects
None yet
Development

No branches or pull requests

3 participants