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

Fix logout redirect URL when clicking logout during a device grant to logout current user #2331

Closed
robotdan opened this issue Jun 17, 2023 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@robotdan
Copy link
Member

Fix logout redirect URL when clicking logout during a device grant to logout current user

Description

When using the device grant with the FusionAuth themed page /oauth2/device you will be shown a logout button if an SSO session already exists to provide the user an option to logout the current user before continuing.

This button uses the post_logout_redirect_uri, and upon redirect to /oauth2/device validation may fail.

Workaround

Replace the logoutLink macro found in the helpers file which is part of your theme with the following:

[#macro logoutLink redirectURI extraParameters=""]
[#local post_logout_redirect_uri = "${redirectURI}?tenantId=${(tenantId)!''}&client_id=${(client_id?url)!''}&nonce=${(nonce?url)!''}&pendingIdPLinkId=${(pendingIdPLinkId)!''}&redirect_uri=${(redirect_uri?url)!''}&response_mode=${(response_mode?url)!''}&response_type=${(response_type?url)!''}&scope=${(scope?url)!''}&state=${(state?url)!''}&timezone=${(timezone?url)!''}&metaData.device.name=${(metaData.device.name?url)!''}&metaData.device.type=${(metaData.device.type?url)!''}${(extraParameters?no_esc)!''}&code_challenge=${(code_challenge?url)!''}&code_challenge_method=${(code_challenge_method?url)!''}&user_code=${(user_code?url)!''}"/]
<a href="/oauth2/logout?tenantId=${(tenantId)!''}&client_id=${(client_id?url)!''}&post_logout_redirect_uri=${post_logout_redirect_uri}">[#t]
  [#nested/][#t]
</a>[#t]
[/#macro]

Is this a question about how to use FusionAuth? Please consider posting on the FusionAuth forum instead.

Community guidelines

All issues filed in this repository must abide by the FusionAuth community guidelines.

@robotdan robotdan added this to the 1.46.0 milestone Jun 17, 2023
@robotdan robotdan added this to Backlog in FusionAuth Issues via automation Jun 17, 2023
@robotdan robotdan added the bug Something isn't working label Jun 17, 2023
@robotdan robotdan self-assigned this Jun 17, 2023
@robotdan robotdan moved this from Backlog to Reviewer approved in FusionAuth Issues Jun 17, 2023
@robotdan
Copy link
Member Author

@robotdan robotdan moved this from Reviewer approved to Done in FusionAuth Issues Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
FusionAuth Issues
  
Delivered
Development

No branches or pull requests

1 participant