We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 03c4955 commit f686b42Copy full SHA for f686b42
2fa_test.go
@@ -2,6 +2,8 @@
2
//
3
// License: BSD 3-Clause License
4
5
+// Note: The tests here are outdated and won't work. It will crash because the focus is still on improving the internal implementation.
6
+
7
package twofa_test
8
9
import (
middleware.go
@@ -42,10 +42,8 @@ func New(config ...Config) fiber.Handler {
42
}
43
44
// Set default values for JSONMarshal and JSONUnmarshal if not provided
45
- if cfg.JSONMarshal == nil {
+ if cfg.JSONMarshal == nil && cfg.JSONUnmarshal == nil {
46
cfg.JSONMarshal = json.Marshal
47
- }
48
- if cfg.JSONUnmarshal == nil {
49
cfg.JSONUnmarshal = json.Unmarshal
50
51
0 commit comments