Google 認証を使用していますが、オリジンの不一致が発生し続けます。私が取り組んでいるプロジェクトには、ユーザーによって生成されたサブドメインがあります。たとえば、次のようなものがあります。
john.example.com
henry.example.com
larry.example.com
私のアプリ設定では、オリジンの 1 つが http://*.example.com になっていますが、オリジンが一致しません。これを解決する方法はありますか?ところで、私のコードは次のようになります。
gapi.auth.authorize({
client_id : 'xxxxx.apps.googleusercontent.com',
scope : ['https://www.googleapis.com/auth/plus.me',
state: 'http://henry.example.com',
'https://www.googleapis.com/auth/userinfo.email', 'https://www.googleapis.com/auth/userinfo.profile'],
immediate : false
}, function(result) {
if (result != null) {
gapi.client.load('oath2', 'v2', function() {
console.log(gapi.client);
gapi.client.oauth2.userinfo.get().execute(function(resp) {
console.log(resp);
});
});
}
});