Logon using OpenID Connect. The scope must include openid. see OpenID Connect Documentation.
OpenID Connect is an extension of OAuth 2.0 Authorization. As part of the specification, the access tokens include an JWT id token.
This token is used to determine whether the user is authenticated and holds data about the user that can be extracted.
Further documentation. .
Javascript example: