-
Notifications
You must be signed in to change notification settings - Fork 51
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
Session storage clear+oidc silent logout/token revoke+traefik url HTTP GET request to logout of server #681
base: feature/distributed-demo
Are you sure you want to change the base?
Conversation
…P GET request to logout of server
…ture/distributed-demo
await auth.revokeTokens(); | ||
|
||
// Make HTTP GET call to logout URL | ||
await fetch(`${process.env.REACT_APP_URL}/_oauth/logout`, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raiiasingh19
Some of the installation scenarios don't have a server listening at this address. If not the fetch
might throw an error. You might want to write a promise with enough code to handle the exceptions. There might be some in the fetch
as well. Please check.
}); | ||
} | ||
|
||
export async function signOut(userManager: UserManager) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function signOut
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
}); | ||
} | ||
|
||
export async function signOut(userManager: UserManager) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function signOut
has 41 lines of code (exceeds 25 allowed). Consider refactoring.
}); | ||
} | ||
|
||
export async function signOut(userManager: UserManager) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function signOut
has 40 lines of code (exceeds 25 allowed). Consider refactoring.
}); | ||
} | ||
|
||
export async function signOut(userManager: UserManager) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function signOut
has 44 lines of code (exceeds 25 allowed). Consider refactoring.
client_secret: clientSecret, | ||
}; | ||
|
||
await fetch(`${process.env.REACT_APP_URL}/_oauth/logout`, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The signout happens via a GET request to this end point. There is no need for a request body. The required information goes via the headers. Please try developer setup and then check localhost/_oauth/logout
. Remember to change the the line-11 of libms.dockerfile
to
COPY ./deploy/config/lib.docker .
You can then use the browser developer tools to check the headers going to the servers.
Perhaps bringing out the server logout to a separate function will remove the codeclimate issues. @atomicgamedeveloper The recent comments are valid for PR #793 too. |
Code Climate has analyzed commit 3538d4a and detected 0 issues on this pull request. View more on Code Climate. |
Fixes #654 and #479