how to intigrate login API's with your project and what are the best resouces available? and sharedPrefrence for storing the User information so he don't need to login again and again
i have not try it yet i am confused
CodePudding user response:
Here is a video covering exact thing that you want. video link
CodePudding user response:
For storing userData and loginPreference so you can prefer get_storage package for local storage: Here the tutorial of local storage: Tutorial link
CodePudding user response:
will it be CLI (linux or python shell maybe) or would it be some type of GUI (WPF, WEB, other)?
IF CLI: you could prompt the user for username and password (making sure to use secure prompts) and then encrypt them with base64 or some other stronger means of encryption. I think base64 is strong enough because if someone unauthorized is already working with this users command line, then they have much bigger problems. in any case, you could save the encrypted output to a hidden file with file permissions of 600 (same as ssh keys) and then recall and un-encrypt in the API call. this would look something like:
creds="~/.ssh/API_CREDS"
echo " ENTER YOUR USERNAME: "
read -p "user name (do not include domain name): " UN
echo " ENTER YOUR PASSWORD: "
read -p "enter your password: " -s PW # -s hides the password from screen
echo "Authorization: Basic `echo -n ${UN}@domain.com:${PW} | base64` > $creds
curl -s -k -H @$creds --location --request GET https://<URL>/<URI>