Assert the login status after the SSO flow starts

This commit is contained in:
Viktor Liu
2026-07-30 19:49:53 +02:00
parent 48578b8fae
commit 67890146b6

View File

@@ -64,6 +64,11 @@ func TestLogin_AuthRefusalStartsSSOFlow(t *testing.T) {
require.Error(t, err)
require.NotErrorIs(t, err, refused,
"the refusal was handed back to the caller instead of starting the SSO flow")
status, stateErr := internal.CtxGetState(s.rootCtx).Status()
require.NoError(t, stateErr)
require.Equal(t, internal.StatusLoginFailed, status,
"the SSO flow setup was never reached with the broken key")
}
// breakProfilePrivateKey replaces the profile's private key with an unparseable