Code Monkey home page Code Monkey logo

Comments (11)

kwent avatar kwent commented on July 17, 2024 3

Not stale. Still waiting for an answer :)

from omniauth_openid_connect.

danjay avatar danjay commented on July 17, 2024 2

Your redirect uri needs to be /auth/name_of_provider/callback

So #{ENV['BASE_URL']}/auth/sign_in_slack/callback

from omniauth_openid_connect.

kwent avatar kwent commented on July 17, 2024 1

Don't have capacity to try this again right now but i'll let you know when i do

from omniauth_openid_connect.

stale avatar stale commented on July 17, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from omniauth_openid_connect.

formigarafa avatar formigarafa commented on July 17, 2024

I am not sure but, try removing the redirect_uri param and let the gem generate one automatically .
maybe the endpoint that should trigger the callback_phase is not being called because of that.

from omniauth_openid_connect.

formigarafa avatar formigarafa commented on July 17, 2024

@kwent did this resolve your problem?

from omniauth_openid_connect.

kwent avatar kwent commented on July 17, 2024

Is this a requirement ? We have this in our routes.rb so shouldn't matter

get "/auth/slack/callback/sign_in" => "omniauth_callbacks#sign_in_slack"

from omniauth_openid_connect.

dgmstuart avatar dgmstuart commented on July 17, 2024

I had the same issue and apparently it is a requirement:

When I had my redirect URL set to just /auth/slack/callback, I also got request.env['omniauth.auth'] nil.
But changing it to /auth/slack/callback (where name: :slack in the OmniAuth::Builder config) I get a CSRF error from the callback phase (which is at least progress).

from omniauth_openid_connect.

dgmstuart avatar dgmstuart commented on July 17, 2024

(Ok for reference, my CSRF issue was dumb: I have ngrok pointing at localhost:3000, but I was starting the authorization from localhost:3000, so the "omniauth.state" cookie (which is used for CSRF protection) was set on localhost and so wasn't available in the callback phase, since that used the ngrok url)

from omniauth_openid_connect.

dgmstuart avatar dgmstuart commented on July 17, 2024

I am not sure but, try removing the redirect_uri param and let the gem generate one automatically

This didn't work for me: this gem doesn't seem to try to construct a redirect_uri? I had a look at the dependent gems as well and they don't seem to either.

Here's the result from Slack of passing it as nil:

Screenshot 2023-10-17 at 23 45 44

from omniauth_openid_connect.

indirect avatar indirect commented on July 17, 2024

I eventually got this working by overwriting the redirect_url method to match what Slack wanted: https://github.com/sunchaserio/omniauth-sign-in-with-slack/blob/main/lib/omniauth/strategies/slack.rb

from omniauth_openid_connect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.