ktor
ktor copied to clipboard
Improve support for oauth providers
Right now Ktor provides functionality to get an OAuth token, and there is a sample with some providers. But for authenticating you need to know which principal are you authenticating, so providing functionality to resolve the user's email or id from the token at least for popular providers would be a really nice addition.
To add to this, it should probably be noted in documentation at least that OAuth by itself is authorisation and not authentication. In other words it is the keys to your house, but not your identity documents.
OpenID Connect is the current best option here that I know of; it supplies an ID token in the OAuth response. The Google example should use this.
At a bare minimum to use OAuth as authentication it needs to have an endpoint that can supply a userID which doesn't change if they change their login name or email for example.
Another point in favor of improving support of Oauth. The client credentials grant would be really useful for authorizing internal and external services communications.
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.