하지 Auth0, JTI (JWT ID)에 refresh_token도를 통해 id_token 갱신 할 때 :Auth0에 로그인 할 때 새로운 id_token
POST https://my.auth0.com/oauth/ro
{
"client_id": "<client-id>",
"username": "[email protected]",
"password": "••••••••",
"connection": "<auth0-connection>",
"grant_type": "password",
"scope": "openid offline_access jti email",
"device": "<device-id>"
}
// Response
{
"refresh_token": "<refresh-token>",
"id_token": "<id-token>",
"access_token": "<access-token>",
"token_type": "bearer"
}
// id_token JWT payload
{
"jti": "3d4c5e97-3543-4c53-b46e-3aa965cd5a34",
"email": "[email protected]",
"email_verified": false,
"iss": "https://my.auth0.com/",
"sub": "auth0|<id>",
"aud": "<aud>",
"exp": 1481766419,
"iat": 1481730461
}
내 범위에서 jti
를 지정하는 경우는 A JWT 인 id_token
반환을 것이다 jti
을 포함하십시오. JWT에 jti
이 있으면 Auth0이 권장합니다. jti
은 JWT를 고유하게 식별하며 JWT를 블랙리스트에 올리는 것과 같이 사용할 수 있습니다. 하지만 어떤 이유
, 내가 새로 고침 토큰을 사용하여 새 id_token
을 받고 시도하는 경우 : 내 범위에서 jti
하는 jti
를 포함하지 않는 반환 id_token
를 지정하더라도
POST https://my.auth0.com/delegation
{
"client_id": "<client-id>",
"grant_type": "urn:ietf:params:oauth:grant-type:jwt-bearer",
"refresh_token": "<refresh-token>",
"api_type": "app",
"scope": "openid offline_access jti email",
"device": "<device-id>"
}
// Response
{
"token_type": "Bearer",
"expires_in": 35958,
"id_token": "<id-token>"
}
// id_token JWT payload
{
"email": "[email protected]",
"email_verified": false,
"iss": "https://my.auth0.com/",
"sub": "auth0|<id>",
"aud": "<aud>",
"exp": 1481766678,
"iat": 1481730720,
"azp": "<azp>"
}
합니다.
이것은 버그입니까? 도와주세요.
감사합니다. 당신 말이 맞았습니다. jti를 설정하는 규칙이있었습니다. refresh_token을 사용하여 새로운 id_token을 얻으려면 어떤 endpoint를 사용해야합니까? {grant_type : "refresh_token", refresh_token :}을 사용하여 https://dev-innit.auth0.com/oauth/token을 시도했으며 unsupported_grant_type을 얻었습니다. 내 자신의 JWT ID 속성을 만드는 것보다 올바른 끝점을 사용하는 것이 좋습니다. –
enamrik
grant_type이 'refresh_token' 인'/ oauth/token'을 사용하려면 고급 계정 설정에서 * OAuth 2.0 API Authorization *을 활성화 한 다음 클라이언트에서 * OIDC Conformant * 플래그를 활성화해야합니다 응용 프로그램 수준. 그러나이를 수행함에도 불구하고 토큰 엔드 포인트를 통해 새로 고칠 때 규칙이 현재 지원되지 않는다고해서 값에 클레임을 추가 할 수는 없습니다. 지금은 사용자 지정 클레임 이름과 위임 끝점 사용이 있습니다. –
고마워, 정말 분명하고 솔직했다. '/ oauth/token'이 커스텀 클레임을 지원할 때까지'/ delegation' 엔드 포인트를 사용하겠습니다. – enamrik