Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
how to scope the /auth/:provider/callback , using OmniAuth for users and members
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Erwin  
View profile  
 More options Oct 6 2012, 1:06 pm
From: Erwin <yves_duf...@mac.com>
Date: Sat, 6 Oct 2012 10:06:00 -0700 (PDT)
Subject: how to scope the /auth/:provider/callback , using OmniAuth for users and members
I have two separate groups of people authenticated w Devise , but in
this case I cannot used the Devise embedded OmniAuth support. So i am
using directly the OmniAuth gem.

Initialized w :
Rails.configuration.middleware.use OmniAuth::Builder do
..provider :twitter,
..
end

It's running fine , but I have an issue with the callback route
mapping :

I tried
    match '/users/auth/:provider/callback', to: 'users/
omniauth_callbacks#create'
    match '/members/auth/:provider/callback', to: 'members/
omniauth_callbacks#create'
but the provider ( fb , twitter, google)  claimebd about the callback
uri :
 "/auth/:provider/callback"
..
as the path_prefix (:path_prefix => "/auth" )  is set in the
initializer , I have no mean to modify it dynamically...

any clue ? or feedback from previous experiences...

thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erwin  
View profile  
 More options Oct 7 2012, 5:03 am
From: Erwin <yves_duf...@mac.com>
Date: Sun, 7 Oct 2012 02:03:21 -0700 (PDT)
Local: Sun, Oct 7 2012 5:03 am
Subject: Re: how to scope the /auth/:provider/callback , using OmniAuth for users and members
[SOLVED] maybe not the best way, but it runs ..
using only one callback url, I can test the
request.env["omniauth.origin"]  which can be tested :

"http://lvh.me:3000/en/users/sign_in"
or
"http://acme.lvh.me:3000/en/members/sign_in"  ( in this cas I can even
test for current_subdomain.nil?

On 6 oct, 19:06, Erwin <yves_duf...@mac.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »