Skip to content

feat: log out and redirect user when converting to oidc #8347

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

Merged
merged 3 commits into from
Jul 10, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update message
  • Loading branch information
Emyrk committed Jul 6, 2023
commit 0293d70f441b3876bc4f052071f796a3671cbffb
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ export const useSingleSignOnSection = () => {

const mutation = useMutation(convertToOAUTH, {
onSuccess: (data) => {
const loginTypeMsg =
data.to_type === "github" ? "Github" : "OpenID Connect"
redirectToOIDCAuth(
data.to_type,
data.state_string,
// The redirect on success should be back to the login page with a nice message.
// The user should be logged out if this worked.
encodeURIComponent(
`/login?info=Login type has been changed to ${data.to_type}. Log in again using the new method.`,
`/login?info=Login type has been changed to ${loginTypeMsg}. Log in again using the new method.`,
),
)
},
Expand Down