How to authenticate to AWS using SSO

How do I use terraform (command line) to authenticate to AWS via SSO?

I have my credentials in: C:\Users<user>.aws\credentials

I can also create env vars for the keys. If anyone has done this and can share, it would be most helpful.

it depends on how you do SSO.
Have you ever heard about saml2aws - as it supports creating temporary AWS credentials while using IdP providers.