We are trying to understand the way we need to create our login flow for our (iOS) app.
We are requesting users to login on their browser; after which they redirect.
The flow is as follows:
[app] -> [opens safari okta login]
[successful login] -> [our server] -> [redirect to appurl]
What we do is log in and authorize. However we want a refresh token as well.
So we tried:
[successful login] -> [our server] -> [another request to okta with the auth token] -> [redirect to appurl]
however; the token requests require a redirect uri! Which is unusable on the server while still processing the response from the login (we need to hold on to the response to redirect to our appurl, where we include the refresh_token!).
At this point we tried reading into several solutions provided in the api’s, but none of them matched the above use case.
Can anyone of you assist in helping us achieve the refresh_token after the successful login?