<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi,</p>
<p>we have a requirement to implement 'One click social-account
linking widgets' on website autheticated by Keycloak JS adapter.
To achieve this a button would be placed on the website with the
following flow:<br>
</p>
<ol>
<li>User logs into the website (keycloak JS adapter)</li>
<li>User browser to a part of the site requiring social account
linking (site checks linking status of current user for given
social login provider based on info in token - we wrote our
mapper for this)</li>
<li>User clicks on a button to link the required social account
with his Keycloak account</li>
<li>User is directed through the linking process (which is similar
as Social Link action in Account app)<br>
</li>
<li>User is returned to original page on successful account
linking (token in js client must be refreshed to contain actual
info about social links).</li>
</ol>
<p></p>
<p>Is there any way how to achieve this? I tried to call JS client
login method with idpHint when user is logged in
(keycloak.login({"idpHint":"github"})), but it doesn't work as
expected.<br>
</p>
<p>Thanks a lot in advance<br>
</p>
Vlastimil<br>
<br>
<pre class="moz-signature" cols="72">--
Vlastimil Elias
Principal Software Engineer
Red Hat Developer | Engineering</pre>
</body>
</html>