Code Monkey home page Code Monkey logo

Comments (7)

toupeira avatar toupeira commented on July 1, 2024 2

@ralph thanks! 🙌

This is now released in 1.7.2 so I'll close this issue.

/cc @nbulaj

from doorkeeper-openid_connect.

ralph avatar ralph commented on July 1, 2024 1

I don't know if it satisfies the spec, but I just created a PR to support end_session_endpoint. For https://github.com/IdentityModel/oidc-client-js, that's enough to work correctly. It will trigger client side hooks and then redirect to the specified url. Check it out here:

#103

from doorkeeper-openid_connect.

toupeira avatar toupeira commented on July 1, 2024

@camilo0365 no plans from my side, but PRs are always welcome! :)

from doorkeeper-openid_connect.

rodrigocvb avatar rodrigocvb commented on July 1, 2024

@ralph do you know if this change adds support to post_logout_redirect_uri as specified in section 3, "Redirection to RP After Logout", of this spec?

https://openid.net/specs/openid-connect-rpinitiated-1_0.html#RPLogout

I'm using oidc-client-js and trying to redirect the user back to the frontend after logout. But I'm not able to do so.

I even updated from 1.7.1 to 1.7.2, but for now I'm facing a circular dependency issue. If my problem (the post_logout_redirect_uri thing) is not solved with this new version, I'm not planning to follow with this update at this moment. Thanks!

from doorkeeper-openid_connect.

ralph avatar ralph commented on July 1, 2024

Hi @rodrigocvb! No, this only adds support for end_session_endpoint, not for post_logout_redirect_uris, I'm afraid.

But maybe you want to open another PR to add this? Implementation should be very similar to #103.

from doorkeeper-openid_connect.

yoonwaiyan avatar yoonwaiyan commented on July 1, 2024

@ralph I've read #103 but I don't see any implementation being done on end_session_endpoint other than allowing users to define it with their own route handling, and your example provided a Devise logout URL, so Doorkeeper will not handle the logout flow as specified in the specs?

from doorkeeper-openid_connect.

FreeCoder22 avatar FreeCoder22 commented on July 1, 2024

Hello,

I've use end_session_endpoint and post_logout_redirect_uri in my project (SSO+ RubyOnRails API) + Client React

end_session_endpoint => http://doorkepper.com/auth/sign_out
post_logout_redirect_uri => http://client.com
ENV["HOST"] => http://doorkepper.com

Add in doorkeeper_openid_connect.rb

  end_session_endpoint do
    Rails.application.routes.url_for({ host:  ENV["HOST"] }, :destroy_user_session)
  end
  subject do |resource_owner|
    # Example implementation:
    resource_owner.id
  end

Add in sessions_controller.rb

  def after_sign_out_path_for(resource)
    postLogoutRedirectUri = params["post_logout_redirect_uri"]
    postLogoutRedirectUri
  end

Add in config oidc-client.js client app

const config = {
authority: config.uri.auth,
    client_id: config.clientId,
    client_secret: config.clientSecret,
    redirect_uri: config.uri.local,
    post_logout_redirect_uri: `${config.uri.local}`,
    metadata: {
      authorization_endpoint: `${config.uri.auth}/oauth/authorize`,
      token_endpoint: `${config.uri.auth}/oauth/token`,
      end_session_endpoint: `${config.uri.auth}/auth/sign_out`,
    },
...
}

from doorkeeper-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.