Conversation
pyotp library for automatic totp fetching while logging in load_dotenv library for fetching environment variable data(secure storage of user credentials)
add otp and env libraries
add environment variables to securely store and access users credentials
add automated 2factor otp generation for logging in
| user = <uid> | ||
| pwd = <password> | ||
| #create .env file to securely access user credentials in program | ||
| load_dotenv('/home/akash/Documents/Projects/.env') |
There was a problem hiding this comment.
Please do not hardcode stuff from your local setup.
There was a problem hiding this comment.
even it better if it can initialize from user env. that means system variable
what do you think
There was a problem hiding this comment.
yes that way
pwd = os.getenv('shoonya_api_pwd')
| vc = os.getenv('vendor_code') | ||
| app_key = os.getenv('api_key') | ||
| imei = <imei> | ||
| factor2 = otp |
There was a problem hiding this comment.
Instead of pushing commits with issues and separate commits to fix them,
please consider rebasing your changes into logical commits.
| #create .env file to securely access user credentials in program | ||
| load_dotenv('/home/akash/Documents/Projects/.env') | ||
|
|
||
| #totp from shoonya dashboard security totp section |
There was a problem hiding this comment.
Not clear what this is referring to.
Is this suggesting to fetch the value of totp from some webpage/URL?
If yes, maybe mention the exact details here.
(including a format/template of what a value looks like.
TheCodeArtist
left a comment
There was a problem hiding this comment.
Not sure if Shoonya-Dev accepts PRs.
However, there are significant issues with this PR in its current form.
| api = ShoonyaApiPy() | ||
|
|
||
| #credentials | ||
| user = <uid> |
There was a problem hiding this comment.
Why is this not merged yet?
the user variable is not used
when api.login is called, userid is assigned a value from uid which is not defined
Implemented data access using environment variables (load_dotenv library) in order to secure users confidential information