title: Laravel app interacting with a 3rd party API to get a token
body: <p>I have one Laravel app with a GUI where the user logs in based on the data from a MySQL database.</p>
  <p>When the user logs in, the server needs to make a request to a specific endpoint of a 3rd party API in order to get a token. This token comes in the response of that request and, since it's some kind of a session token, it renews from time to time (which implies that this same request which retrieves the token should be called if a particular error is thrown).</p>
  <p>In some specific views / routes the associated logic in the controller implies a request to one or more endpoints of that 3rd party API with the previsouly acquired token in the body or in the headers - depending on the endpoint.</p>
  <p>I'm mostly concerned if someone gets access to that particular token. If that happens, then they could interact with the 3rd party API and do an unwanted mess. So I'm ok if the pages or operations take a little longer as long as the implemented procedure is very secure (the risk of the previous scenario to happen be extremely low).</p>
  <p>What's the procedure I should aim for? The desired answer would take advantage of Laravel &quot;machineries&quot; and refer where and how this token should be stored.</p>