azure-mobile-apps cordovaクライアントを使用してmobile app
を開発中です。私はリフレッシュトークンを取得するためにこのhttps://cgillum.tech/2016/08/10/app-service-auth-and-azure-ad-b2c-part-2/を追跡しました。azure-mobile-apps cordovaクライアントを使用してトークンとログアウトをリフレッシュ
ヘッダーにid_tokenを送信しています。
var token = window.localStorage.getItem("token");
var appUrl = https://Mobile****.azurewebsites.net;
var url = appUrl + "/.auth/refresh";
$http.get(url, {
headers: {
'X-ZUMO-AUTH': token
}
})
.then(function(response) {
console.log(response);
});
応答:401不正な。 IDX10500:署名の検証に失敗しました。 SecurityKeyIdentifierを解決できません...
私は自分の秘密鍵をResource explorerとTenant - > Application - > Keysで比較しました。
どちらも同じです。 私はログアウトについても質問したいと思いますが、このエンドポイントで上記と同じように送信することができます/.auth/logout
。
こんにちは@devangi、どんなアップデート? –
こんにちは遅れて申し訳ありません。はい、これらのトークン(mobileServiceAuthenticationToken、id_token&refresh_token)について質問しますか?期限切れの時間、id_tokenとrefresh_tokenは/.auth/meエンドポイントから利用できます。 私は、mobileServiceAuthenticationTokenを(/.auth/refreshを使用して)生成しても、1時間以内にそれを見ることができますが、有効期限は同じです(/.auth/meにあります)。 古いトークンで/.auth/refreshを呼び出すと、1時間後に500の内部サーバーエラーが発生します。だから、mobileServiceAuthenticationトークンの生涯は何ですか、id_token&refresh_token? – devangi
ユーザーを永久にログインさせ続ける方法については、[this thread](http://stackoverflow.com/questions/41310757/mobileservices-web-js-unauthorized-api-call)を参照してください。 –