Skip to content

Commit 0293d70

Browse files
committed
Update message
1 parent 596605e commit 0293d70

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

site/src/pages/UserSettingsPage/SecurityPage/SingleSignOnSection.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,15 @@ export const useSingleSignOnSection = () => {
4141

4242
const mutation = useMutation(convertToOAUTH, {
4343
onSuccess: (data) => {
44+
const loginTypeMsg =
45+
data.to_type === "github" ? "Github" : "OpenID Connect"
4446
redirectToOIDCAuth(
4547
data.to_type,
4648
data.state_string,
4749
// The redirect on success should be back to the login page with a nice message.
4850
// The user should be logged out if this worked.
4951
encodeURIComponent(
50-
`/login?info=Login type has been changed to ${data.to_type}. Log in again using the new method.`,
52+
`/login?info=Login type has been changed to ${loginTypeMsg}. Log in again using the new method.`,
5153
),
5254
)
5355
},

0 commit comments

Comments
 (0)