AzureADに対して既に認証されている場合は、自分のアプリケーションでシングルサインオンが可能ですか?MSAL.jsでシングルサインオン?
Prossible流れ:私のアプリ https://login.microsoftonline.com/tenantid/oauth2/authorize?client_id=clientid(ISH)にリダイレクト
- - >トークンを返し、 が戻って自分のアプリケーション へのリダイレクト
次回は有効なCookieがある場合はアプリケーションを使用しますが、私はmicrosoftonline.comにリダイレクトされず、アプリを直接。要するに
、私はエンドユーザーのためのポップアップを表示せずにコールバックを取得したいと思います:テナントと一つだけのユーザーを指定した場合
<script class="pre"> var userAgentApplication = new Msal.UserAgentApplication("your_client_id", null, function (errorDes, token, error, tokenType) { // this callback is called after loginRedirect OR acquireTokenRedirect (not used for loginPopup/aquireTokenPopup) }) userAgentApplication.loginPopup(["user.read"]).then(function(token) { var user = userAgentApplication.getUser(); if (user) { // signin successful } else { // signin failure } }, function (error) { // handle error }); </script>
ありがとうございました.ADAL.jsで作業していますが、MSALに移行したいと考えていました。 – thllbrg