回答のおかげで非常に簡単です:ちょうどomniauth_callbacks_controllerにあればパスを追加します::この
# If a user is signed in then he is trying to link a new account
if user_signed_in?
if authentication.persisted? # This was a linking operation so send back the user to the account edit page
flash[:success] = I18n.t "controllers.omniauth_callbacks.process_callback.success.link_account",
:provider => registration_hash[:provider].capitalize,
:account => registration_hash[:email]
else
flash[:error] = I18n.t "controllers.omniauth_callbacks.process_callback.error.link_account",
:provider => registration_hash[:provider].capitalize,
:account => registration_hash[:email],
:errors =>authentication.errors
end
redirect_to edit_user_account_path(current_user)
ようprocess_callback方法は、これは私が自分のアプリケーションに何をすべきかであり、それは正常に動作します。
質問2について私は2種類のFacebook認証構成をサポートする方法はわかりませんが、「facebookを使ってサインインする」と「リンクを使用してサインイン」の両方のパスで一貫性のある体験が必要なので、 Facebookへのあなたのアカウント "。 (まだこの道を追求したいのであれば、私が探求する1つのアイデアは、独立したキーと設定で新しいFacebookのアプリケーションを作成することです...)
「一貫性のある経験が必要なのでユーザーにとってどのように役立つのかよく分かりません」と答えています。サイトには、より多くのアクセス権しか必要としない機能があります。例えば、私たちは最低限の許可を求めます。しかし、何かをもっと欲しいものにするには(たとえば、プロファイルからいくつかの詳細を得るなど)、より多くのアクセス権を要求する必要があります。 – katzmopolitan