質問編集履歴
2
一部修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
Rails側のAPIは完成しており、フロント側とのつなぎ込みを行っています。
|
11
11
|
しかし、「1」でGoogle sign in」ボタンを押下したタイミングで以下のエラーが発生し、先に進めません。
|
12
12
|
|
13
|
-
> Access to XMLHttpRequest at 'https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=00000000000-ajshfashashfkahfahflahfjaafja.apps.googleusercontent.com&redirect_uri=http%3A%2F%2F180.160.41.51%
|
13
|
+
> Access to XMLHttpRequest at 'https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=00000000000-ajshfashashfkahfahflahfjaafja.apps.googleusercontent.com&redirect_uri=http%3A%2F%2F180.160.41.51%2Fxxxx%2Fxxxx%2Fxxxx2%2Fcallback&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcalendar&state=f5q7877089gsdg6s0g76dsg7d6sgs6gsg9d' (redirected from 'http://180.160.41.51/xxxx/xxxx/google_oauth2?current_member_id=1') from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
|
14
14
|
|
15
15
|
同様の状況での問題としては、[この記事](https://qiita.com/TakumaKurosawa/items/781d6bce09a6a8ebb45c)があり、参考にしています。
|
16
16
|
|
1
重複する文言を削除しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
別ドメイン上に存在するvue.jsとRailsを利用し、WEBアプリケーションを開発しており、Googleログインの機能実装しています。全体としては、以下の流れでの処理を想定しています。
|
2
2
|
(Googleログインの機能はomniauthを利用しています。)
|
3
3
|
|
4
|
-
0. フロント側(vue.js)からGoogleボタンを押下
|
4
|
+
0. フロント側(vue.js)からGoogleボタンを押下してRailsにリクエスト
|
5
|
-
0. Rails
|
5
|
+
0. RailsからGoogleのoauth2のAPIにリクエスト
|
6
6
|
0. Googleのoauth2にて認証処理
|
7
7
|
0. Google API Consoleで指定されたrailsにCall backし、レスポンスの内容を処理
|
8
8
|
0. vue.js側でレスポンスに合わせて処理
|