Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Use the oidc v1/logout endpoint to logout users #351

Open
zeekhoo opened this issue Sep 10, 2020 · 1 comment · May be fixed by #494
Open

[FEATURE] Use the oidc v1/logout endpoint to logout users #351

zeekhoo opened this issue Sep 10, 2020 · 1 comment · May be fixed by #494
Assignees
Labels
type: feature New feature or request

Comments

@zeekhoo
Copy link
Contributor

zeekhoo commented Sep 10, 2020

The fromURI parameter will soon be deprecated, so it is better to use the logout endpoint

Here's how I've implemented this locally:

def gbac_logout():
    logger.debug("gbac_logout()")
    id_token = TokenUtil.get_id_token(request.cookies)
    iss = TokenUtil.get_claims_from_token(id_token)["iss"]

   redirect_url = "{iss}/v1/logout?id_token_hint={id_token}&post_logout_redirect_uri={post_logout_redirect_uri}".format(
        iss=iss,
        id_token=id_token, 
        post_logout_redirect_uri="http://localhost:8666"
    )

    response = make_response(redirect(redirect_url))
    response.set_cookie(TokenUtil.OKTA_TOKEN_COOKIE_KEY, "")
    return response
@dzadikdev
Copy link
Contributor

@zeekhoo Can you do a PR on this or want me to?

@noinarisak noinarisak added the type: feature New feature or request label Oct 6, 2020
@noinarisak noinarisak changed the title Use the oidc v1/logout endpoint to logout users [FEATURE] Use the oidc v1/logout endpoint to logout users Oct 6, 2020
@mdwallick mdwallick assigned mdwallick and unassigned srecinto and dzadikdev Feb 3, 2022
@mdwallick mdwallick linked a pull request Feb 4, 2022 that will close this issue
@mdwallick mdwallick removed a link to a pull request Feb 7, 2022
@mdwallick mdwallick linked a pull request Feb 7, 2022 that will close this issue
@noinarisak noinarisak linked a pull request Feb 8, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants