Mark Andrews
  • Home
  • Creative
  • Contact

Use AWS CLI to authenticate a Cognito client and get access_token

Mark Andrews

07 Jan 2023

Generate the secret hash via https://aws.amazon.com/premiumsupport/knowledge-center/cognito-unable-to-verify-secret-hash/

Then:

aws cognito-idp initiate-auth --region ap-southeast-2 --auth-flow USER_PASSWORD_AUTH --client-id <clientid> --auth-parameters USERNAME=<username>,SECRET_HASH=<generated-secret>,PASSWORD=<password>

dotnet core local auth

Bypass auth for local access if (app.Environment.IsDevelopment()) app.MapControllers().AllowAnonymous(); else app.MapControllers();
09 Feb 2025

VS Code on Windows, save without formatting

Default on Windows: Ctrl + k then Ctrl + Shift + s How do I turn off text formatting on save in visual studio code?I don’t know why my code is auto formatted on save and for some reason changing the layout. I figured out this was due to auto format
18 Oct 2024 1 min read

git ignore files but only on the local repo

Naturally untracked files can be added to the .gitignore, and there are workarounds to update the history to remove files from tracking and .gitnore. I had to update a config file, to include a setting that I only wanted on my machine. I did not want to be able to
16 Oct 2024 1 min read
Mark Andrews © 2025
  • Privacy
Powered by Ghost