Closed andreas-it-dev closed 2 years ago
fwiw, i added the omniauth-twitter
gem and /auth/twitter
is happily responding..
so, we could rule out a general omniauth issue, probably
i also tried a rails 6.0.4 fresh app real quick.. same error
did some quick look and fired up the debugger.. it doesnt even break in the setup_phase
method..(?)
I'm having the same problem here. Have you found what should be the endpoint?
nope, i put this on the stack hoping for the author to respond, eventually..
Hey @awunder. I overcome this by setting the option name as per in the omniauth strategy docs. I endup to add this option while setting the provider, like this:
Rails.application.config.middleware.use OmniAuth::Builder do
provider :keycloak_openid, 'xxxCLIENTxxx', 'xxxKEYxxx',
client_options: {site: 'https://auth.xxxDOMAINxxx.com', realm: 'xxxREALMxxx'},
name: "what_ever"
end
Then I successfully request via POST
<%= button_to 'Sign In', '/auth/what_ever' %>
Hope it helps.
I think this info would be helpful in READMME
hey @frenesim thank you so much for this.. this indeed helped a lot!
i had to deal with some other stuff so i couldnt really test this out..
now i did, but the funny thing is, that now the auth callback url doesnt work..
i gave it a name via
and now the redirect fails with a No route matches [GET] "/auth/ofwd/callback"
@frenesim did this work for you?
please disregard, i commented out the callback route :facepalm:
Hi, first of all thanks for this gem.
I just create a new rails 6.1 project and first thing to me is to get auth working.. so there is nothing installed except this gem plus its dependencies..
i have configured this initializer:
this route:
post '/auth/:provider/callback', to: 'sessions#create'
and just for testing a quick and dirty
<%= button_to 'Sign In', '/auth/keycloak_openid' %>
to get the ball rolling.. i click on it and get this
No route matches [POST] "/auth/keycloak_openid"
error.however, Omniauth is present and its config suggests the
keycloak_openid
provider is too:i also gave
auth/keycloak
a shot (yeah, proly made no sense, but just in case)... - same thingidk what i did wrong here, maybe its a bug (with rails 6.1)..(?)