metakgp / heimdall

Single source of authorising KGPians for all of metaKGP services
https://heimdall.metakgp.org/
GNU General Public License v3.0
3 stars 4 forks source link

Show the user that there is still a cooldown for OTP #13

Closed proffapt closed 4 months ago

proffapt commented 5 months ago
Dami-18 commented 5 months ago

What is the issue exactly? Can I work on it?

proffapt commented 5 months ago

So the issue is:

If you have requested for OTP, you can't request for another till 1 minute cooldown timeout. This is implemented in backend but the user won't know from frontend and when they try to request it again within that timeframe they receive this generic error message "Failed to send the OTP".

Sure go ahead and just present the actual error received from the backend.

Dami-18 commented 5 months ago

Facing issues in setup. Heimdall server is running on port 3333 but when I enter my mail Id and click generate otp, it is not able to find credentials.json file

Dami-18 commented 5 months ago

So not getting otp even for the first time

proffapt commented 4 months ago

have you configured Gmail api credentials?

proffapt commented 4 months ago

The documentation is not updated. cc @rohan-b-84 @chirag-ghosh

Dami-18 commented 4 months ago

have you configured Gmail api credentials?

How do I do that?

Dami-18 commented 4 months ago

But why is it working without any configuration on the hosted site?

rohan-b-84 commented 4 months ago

@proffapt updating documentation itself is an issue https://github.com/metakgp/heimdall/issues/11

@Dami-18 to get credentials.json file first create the OAuth consent screen and then create OAuth client ID credentials and save the downloaded json as credentials.json in the project's root folder.

If you get through this, can you also take #11 as well ?

chirag-ghosh commented 4 months ago

@Dami-18 it is working on the hosted site because it has those files. We add them to the server when we set it up. A better documentation will make things clear.

Dami-18 commented 4 months ago

@proffapt updating documentation itself is an issue #11

@Dami-18 to get credentials.json file first create the OAuth consent screen and then create OAuth client ID credentials and save the downloaded json as credentials.json in the project's root folder.

If you get through this, can you also take #11 as well ?

Ok once I am able to successfully run the dev server, I will update documentation too

proffapt commented 4 months ago

There's an issue corresponding to documentation #11

Dami-18 commented 4 months ago

I got the credentials.json file but after running server, when it says go to following link and enter the authentication code, it always says refused to connect or invalid request after clicking on the link. I tried changing redirect urls and checked network also but still facing same error. What could be the possible issue?

chirag-ghosh commented 4 months ago

When it redirects, the url will redirect to localhost and will contain the code in the url parameters itself. ?code=something ig. That something is the code you need to paste in the terminal. I know this is a really janky way to do but once that token.json is created, It'll be valid for 6months so I didn't care about it much

Dami-18 commented 4 months ago

Also @proffapt new version of erp-login package expected to release when? We need to complete gyfe and gyft before subject registration

proffapt commented 4 months ago

Also @proffapt new version of erp-login package expected to release when? We need to complete gyfe and gyft before subject registration

https://metakgp.slack.com/archives/C05KTAL5ARM/p1719258932859839