Giter VIP home page Giter VIP logo

Comments (3)

soofstad avatar soofstad commented on July 20, 2024

Thanks for reporting this. Will be looking into it as soon as I can

from react-oauth2-pkce.

soofstad avatar soofstad commented on July 20, 2024

1.Document mentions that redirect uri is supposed to be the location where auth should take user after user logs out. But after we log in, we are redirected to the "redirectUri"

Bad documentation. Fixed. Thanks for reporting 👍

  1. I logout user using the logOut() function while having the logoutRedirect to some other path, but it still takes me to the "redirectUri"

How is your logout endpoint configured?
You might take note of the fact that the parameter that is posted to the API is not logoutRedirect, but post_logout_redirect_uri.

You can see how this in done in this piece of code:

export function redirectToLogout(
  config: TInternalConfig,
  token: string,
  idToken?: string,
  state?: string,
  logoutHint?: string
) {
  const params = new URLSearchParams({
    token: token,
    // TODO: Add config param for token type
    token_type_hint: 'refresh_token',
    client_id: config.clientId,
    post_logout_redirect_uri: config.logoutRedirect ?? config.redirectUri,
    ui_locales: window.navigator.languages.reduce((a: string, b: string) => a + ' ' + b),
    ...config.extraLogoutParameters,
  })
  if (idToken) params.append('id_token_hint', idToken)
  if (state) params.append('state', state)
  if (logoutHint) params.append('logout_hint', logoutHint)

  window.location.replace(`${config.logoutEndpoint}?${params.toString()}`)

from react-oauth2-pkce.

sebastianvitterso avatar sebastianvitterso commented on July 20, 2024

@ghauri899 Any further updates/info on this?

I'll close the issue for now, but feel free to provide further details and we can re-open it.

from react-oauth2-pkce.

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.