diff --git a/fastapi_keycloak/api.py b/fastapi_keycloak/api.py index 2bfc820..40761fa 100644 --- a/fastapi_keycloak/api.py +++ b/fastapi_keycloak/api.py @@ -1064,6 +1064,7 @@ def _admin_request( def login_uri(self): """The URL for users to login on the realm. Also adds the client id and the callback.""" params = { + "scope": "openid profile email", "response_type": "code", "client_id": self.client_id, "redirect_uri": self.callback_uri, diff --git a/fastapi_keycloak/model.py b/fastapi_keycloak/model.py index 1700345..56a4a5d 100644 --- a/fastapi_keycloak/model.py +++ b/fastapi_keycloak/model.py @@ -207,10 +207,12 @@ class KeycloakToken(BaseModel): Attributes: access_token (str): An access token refresh_token (str): An a refresh token, default None + id_token (str): An issued by the Authorization Server token id, default None """ access_token: str refresh_token: Optional[str] = None + id_token: Optional[str] = None def __str__(self): """String representation of KeycloakToken"""