My API should support “official” apps as well as third-party apps. For official apps I don’t want the user to explicitly grant access (after login).
I’m I right, that I can skip the “allow” screen as long as I restrict the redirect_uri to something like http://official.service.tdl? Or does this has security implication I didn’t think of?
For official apps, assuming they are confidential clients, you can use
client credentials grant. It sounds like the official app and your API will have a pre-established relationship, and your organization also controls the access server. In theclient credentials grantthe client can just talk to the access server directly and gets a token to use with your API.If you want to bypass user authorization when the redirect uri is from your company, then you should look at Authorization Code Redirection URI Manipulation, in particular
and you would need to make sure you don’t have any open redirects that match your redirect URI.
Or you can just let users authorize access once and use refresh tokens so they don’t need to re-authorize access.