mirror of
https://github.com/c9s/bbgo.git
synced 2024-09-20 08:11:08 +00:00
interact: fix auth
This commit is contained in:
parent
41c78f9035
commit
b2e17e3552
|
@ -83,12 +83,14 @@ func (it *AuthInteract) Commands(interact *Interact) {
|
|||
return ErrAuthenticationFailed
|
||||
})
|
||||
} else {
|
||||
interact.Command("/auth", "authorize", func(reply Reply) error {
|
||||
interact.Command("/auth", "authorize", func(reply Reply, session Session) error {
|
||||
switch it.Mode {
|
||||
case AuthModeToken:
|
||||
session.SetAuthorizing(true)
|
||||
reply.Message("Enter your authentication token")
|
||||
|
||||
case AuthModeOTP:
|
||||
session.SetAuthorizing(true)
|
||||
reply.Message("Enter your one-time password")
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue
Block a user