File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
site/src/pages/UserSettingsPage/SecurityPage Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -41,13 +41,15 @@ export const useSingleSignOnSection = () => {
41
41
42
42
const mutation = useMutation ( convertToOAUTH , {
43
43
onSuccess : ( data ) => {
44
+ const loginTypeMsg =
45
+ data . to_type === "github" ? "Github" : "OpenID Connect"
44
46
redirectToOIDCAuth (
45
47
data . to_type ,
46
48
data . state_string ,
47
49
// The redirect on success should be back to the login page with a nice message.
48
50
// The user should be logged out if this worked.
49
51
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.` ,
51
53
) ,
52
54
)
53
55
} ,
You can’t perform that action at this time.
0 commit comments