I am trying to implement delegated authorization in a Web API for mobile apps using OAuth 2.0. According to specification, the implicit grant flow does not support refresh t
Unfortunately, I don't think there is a clear answer to this question. However, here are the options that I've identified:
If it is ok to ask the user for his/her credentials, then use the Resource Owner Password Credentials. However, this may not be possible for some reasons, namely
If usage of a browser based flow is required, then use the Authorization Code Flow. Here, the definition of the redirect_uri
is a major challenge, for which there are the following options:
redirect_uri
(e.g. urn:ietf:wg:oauth:2.0:oob
) signals the authorization endpoint to show the authorization code instead of redirecting back to the client app. The user can manually copy this code or the app can try to obtain it from the HTML document title.localhost
server at the device (the port management may not be easy).myapp://...
) that when dereferenced triggers a registered "handler" (the details depend on the mobile platform).Hope this helps
Pedro