Skip to content

Commit d63bd58

Browse files
author
Mike Morris
committed
Fix Forgerock error message checking with MFA
1 parent c0fa828 commit d63bd58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/saml/forgerock_client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ func (c *forgerockSamlClient) auth() error {
114114
// try push, if fail ... try code, if fail ... try no mfa?
115115
c.MfaType = MfaTypePush
116116
if err := c.auth(); err != nil {
117-
if err.Error() == "auth status code 401" {
117+
if strings.HasPrefix(err.Error(), "auth status code 401") {
118118
c.MfaType = MfaTypeCode
119119
if err := c.auth(); err != nil {
120-
if err.Error() == "auth status code 401" {
120+
if strings.HasPrefix(err.Error(), "auth status code 401") {
121121
// this may or may not be a good idea
122122
c.MfaType = MfaTypeNone
123123
return c.auth()

0 commit comments

Comments
 (0)