Log in Omniauth without refreshing the page?

I use the Omniauth pearl to have my users log in via Twitter.

I want the omniauth process to happen behind the scenes, so I'm trying to link to /auth/twitter a remote: true . However, when I do this, I get a “Callback Phase” and then nothing else.

I assume this is because the omniauth stone only recognizes standard calls. How do I get answers to AJAX calls?

 = link_to "Sign in with Twitter", twitter_signin_path, remote: true 
+4
source share
1 answer

This is not possible because the oauth authorization stream includes a redirect to the provider's website.

This step takes place on twitter.com. Its impossible to terminate a stream from an AJAX javascript request.

+1
source

All Articles