Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MFA No token provided #43

Closed
sandersc242 opened this issue Aug 4, 2021 · 7 comments · Fixed by #44
Closed

MFA No token provided #43

sandersc242 opened this issue Aug 4, 2021 · 7 comments · Fixed by #44

Comments

@sandersc242
Copy link

Attempting to complete multi-factor authentication but no code is provided in the log
From what I understand it will provide a auth code that needs to be echo'd to tokens

Log:
2021/08/04 00:04:33 I [0/0] rtsp-simple-server v0.16.4
2021/08/04 00:04:33 I [0/0] [RTSP] TCP listener opened on :8554
2021/08/04 00:04:33 I [0/0] [RTMP] listener opened on :1935
2021/08/04 00:04:33 I [0/0] [HLS] listener opened on :8888
STARTING DOCKER-WYZE-BRIDGE v0.5.0
Could not find local cache for user
Could not find local cache for auth
Fetching auth from wyze api...
MFA Token Required
Add token to /tokens/mfa_token

Yaml:
version: '3.8'
services:
wyze-bridge:
container_name: wyzebridge
restart: always
# network_mode: host
image: mrlt8/wyze-bridge:latest
ports:
- 1935:1935
- 8554:8554
- 8555:8555
# build:
# context: ./app
# dockerfile: Dockerfile.arm
environment:
- WYZE_EMAIL=*******
- WYZE_PASSWORD=******
- LAN_ONLY=True
- RTSP_PROTOCOLS=tcp

@sandersc242
Copy link
Author

sandersc242 commented Aug 4, 2021

I've gotten sms 2fa working however I am still unsure how to add the token to wyzebridge.
using "docker volume ls" -----I don't see a tokens volume to mount
using "docker-compose run wyzebridge echo "123456" > /opt/wyzecam/tokens/mfa_token" ----- It returns No such file or directory

@mrlt8
Copy link
Owner

mrlt8 commented Aug 4, 2021

SMS verification? I'll need to take a second look and workout a fix!

paths have changed in recent versions, so you'll need to add your code to /tokens/mfa_token:

docker exec -it wyzebridge sh -c 'echo "123456" > /tokens/mfa_token'

@sandersc242
Copy link
Author

SMS verification? I'll need to take a second look and workout a fix!

paths have changed in recent versions, so you'll need to add your code to /tokens/mfa_token:

docker exec -it wyzebridge sh -c 'echo "123456" > /tokens/mfa_token'

Wyze api attempts to auth by sending a SMS text code. Using the echo path with an invalid token triggers Wyze api to send a code. Entering a correct code for some reason does the same, the logs say the valid code is invalid and attempts again sending a new code-- I'm stuck in a loop.

Using 123456 as token
Enter Wyze SMS 2FA Verification Code: The request to the Wyze API failed.
The server responded with: {'description': 'Invalid Verification Code.', 'requestId': '55f8c0d0-7804-4817-9d8e-1a8fa89e6e87', 'errorCode': 1000}
Please try again!
Using 424889 as token
Enter Wyze SMS 2FA Verification Code: The request to the Wyze API failed.
The server responded with: {'description': 'Invalid Verification Code.', 'requestId': 'ffd6318c-f2ac-4712-8fd1-c9bf60cc2d55', 'errorCode': 1000}
Please try again!

@mrlt8
Copy link
Owner

mrlt8 commented Aug 4, 2021

Should be fixed in the dev branch.
Could you give it try and let me know if it works?

@mrlt8 mrlt8 linked a pull request Aug 4, 2021 that will close this issue
Merged
@sandersc242
Copy link
Author

sandersc242 commented Aug 4, 2021

Unsure how to pull the dev branch, but I did this-
docker-compose pull && docker-compose up -d
docker exec -it wyzebridge sh -c 'echo 123456 > /tokens/mfa_token' To trigger sms auth code
docker exec -it wyzebridge sh -c 'echo AUTHCODE > /tokens/mfa_token'
docker logs wyzebridge

Enter Wyze SMS 2FA Verification Code: The request to the Wyze API failed. The server responded with: {'description': 'Invalid Verification Code.', 'requestId': '674ee748-f3e4-4157-9c35-b79666b09806', 'errorCode': 1000} Please try again! Using 460210 as token The user account has too many failed login attempts. Please wait a bit and try again. The server responded with: {'description': 'Too many failed attempts. Please try again later.', 'requestId': 'f914d8bf-0bf4-4a9c-9b85-fc8d9cc69243', 'errorCode': 1000} Please try again!

@mrlt8 mrlt8 closed this as completed in #44 Aug 5, 2021
@mrlt8
Copy link
Owner

mrlt8 commented Aug 5, 2021

I merged the dev into the main branch.
Please let me know if it works!

@sandersc242
Copy link
Author

I merged the dev into the main branch.
Please let me know if it works!

SUCCESS!!!, after pulling I received an auth code, entered with echo and now I have streams. Thank You!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants