Apparently it’s not yet possible. One way to get there though is to use a custom OAuth plugin as described in the doc.
E.g. here is some dummy code showing how it could work:
class GoogleLoginHandler(OAuthIDTokenLoginHandler, OAuth2Mixin):
_API_BASE_HEADERS = {
"Content-Type": "application/x-www-form-urlencoded; charset=utf-8"
}
_OAUTH_AUTHORIZE_URL = "https://accounts.google.com/o/oauth2/v2/auth"
_OAUTH_ACCESS_TOKEN_URL = "https://accounts.google.com/o/oauth2/token"
_SCOPE = ['profile', 'email']
_USER_KEY = 'email'
##### Madness starts here ######
def _simple_get(self):
html = BASIC_LOGIN_TEMPLATE.render(
errormessage="",
PANEL_CDN=CDN_DIST
)
self.write(html)
async def get(self):
if "state" not in self.request.uri:
self._simple_get()
else:
await super().get()
async def post(self):
await super().get()