0
votes

I'm building an API using Laravel for a Swift iOS App. I'm using JWT to authenticate users from the app.

One part of the app is connecting 3rd party OAuth accounts such as Twitch. The issue I have is that my after an OAuth requests redirects to my callback, the user's JWT is no longer part of the request.

What would be the best way to preserve the JWT through a 3rd party OAuth request?

1

1 Answers

0
votes

I've managed to solve this by doing the following:

  1. Intercept callback using UIWebViewDelegate
  2. Create mutable request from original callback request
  3. Append auth header
  4. Load the request again

If there's a better solution to this, I'm all ears.