<div dir="ltr"><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Hello everyone,</span><div style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Is it expected that Javascript clients are allowed to get refresh tokens using hybrid flow?  </span><br><div><br></div><div>According to the OIDC spec and to the Multiple Response Types Encoding Practice spec, in the hybrid flow the authoriation code by default is returned with fragment encoding (query encoding must not be used). This means a Javascript client can get hold of the authorization code and use it to get a refresh token. With this refresh token, the Javascript client can keep refreshing access tokens using the "none" client authentication mechanism. </div><div><br></div><div>However, the OAuth2 spec (section 10.4) says "<i>Refresh tokens MUST be kept confidential in transit and storage</i>". But Javascript clients are by nature public clients which are unable to keep the refresh tokens confidential. And neither OIDC spec security considerations section nor the OAuth2 Threat Model spec cover the case where the refresh tokens are stored in a JS client, for example against tampering the refresh token stored in the local storage. </div><div><br></div><div>Therefore I am not clear if it is expected to use refresh tokens with Javascript clients or not. Please help me to clearify this point. </div><div><br></div><div>Thanks & regards,</div><div><div dir="ltr" class="gmail-m_589810328701156715gmail_signature">Suresh Attanayake</div></div></div><br></div></div>