Getting a User Token inside iOS App

Dear Berry,
thanks for your answer. I managed it this way:
On my server I hosted a php file with this script:

<?php
$code = $_GET['code'];
if (isset($code)) {
  header("Location: myApp://callback?code=" . $code);
} else {
  echo "Authorization failed.";
}
?>

In my Code I fetched the Information with

.onOpenURL{ url in
                guard let components = NSURLComponents(url: url, resolvingAgainstBaseURL: true),
                let scheme = components.scheme,
                let host = components.host,
                let queryItems = components.queryItems else { return }
                if scheme == "myApp", host == "callback" {
                    ...
                }
}

Thanks for your help!