<s>[INST] # Authentication for simulating user behavior

Hello everyone,
I'm hoping someone can help me with this. I'm building a golang web application, and I'm trying to figure out the best way to implement authentication for simulating user behavior.

Specifically, I want to be able to allow users to log in to my application, and then use their credentials to make requests on their behalf to a third-party API. This API requires authentication, and the credentials I have are in the form of a username and password.

Here's the basic flow I envision:
1. User logs in to my app with their username and password.
2. My app stores the username and password securely (I'm thinking of using a library like hashicorp's vault to store them securely).
3. When the user makes a request to my app that requires the third-party API, my app uses the stored username and password to authenticate with the third-party API.
4. My app uses the authenticated session to make the request to the third-party API on the user's behalf.

My question is twofold:

1. Is this the right approach?[/INST]