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

Fix 2fa auth for dsm 7 #13

Merged
merged 2 commits into from
Jul 23, 2021
Merged

Fix 2fa auth for dsm 7 #13

merged 2 commits into from
Jul 23, 2021

Conversation

mib1185
Copy link
Owner

@mib1185 mib1185 commented Jul 23, 2021

Beginning with DSM 7 a new version of SYNO.API.Auth was introduced - version 7.
In case of 2fa auth device ID to skip OTP checking is responded as device_id (not did):

DSM 7 (api version 7)

DEBUG: Request url: http://192.168.100.10:5000/webapi/entry.cgi?account=******&passwd=********&enable_device_token=yes&device_name=******&format=sid&otp_code=012345&api=SYNO.API.Auth&version=7&method=login
DEBUG: Request status_code: 200
DEBUG: Request headers: {'Server': 'nginx', 'Date': 'Sat, 10 Apr 2021 20:22:17 GMT', 'Content-Type': 'application/json; charset="UTF-8"', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Keep-Alive': 'timeout=20', 'Vary': 'Accept-Encoding', 'P3P': 'CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"', 'X-Content-Type-Options': 'nosniff, nosniff', 'X-XSS-Protection': '1; mode=block, 1; mode=block', 'Set-Cookie': 'did=q0YtE1dlwUWJWtX2UUMbf7l4pbdtvKWEGH3tJjpxfc2t4oUeAw2g5cKjAB-QfLGx6ncZGuteJZEHAKfiYax_Nw;expires=Mon, 10-May-2021 20:22:17 GMT;path=/;HttpOnly', 'Cache-Control': 'max-age=0, no-cache, no-store, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0', 'Content-Encoding': 'gzip'}
DEBUG: Request Method: GET
DEBUG: Successful returned data
DEBUG: API: SYNO.API.Auth
DEBUG: RESPONSE: {'data': {'account': 'hass', 'device_id': 'q0YtE1dlwUWJWtX2UUMbf7l4pbdtvKWEGH3tJjpxfc2t4oUeAw2g5cKjAB-QfLGx6ncZGuteJZEHAKfiYax_Nw', 'ik_message': '', 'is_portal_port': False, 'sid': '4fTalf67x6P__2vQO76czw5me1oQbRsszAIlLzTY3bQlAO-RUXsxYquIpkSj5XZ2M0WAF8cbQ108PQQG3J0vl0', 'synotoken': '--------'}, 'success': True}
DEBUG: Authentication successful, token: 4fTalf67x6P__2vQO76czw5me1oQbRsszAIlLzTY3bQlAO-RUXsxYquIpkSj5XZ2M0WAF8cbQ108PQQG3J0vl0

@mib1185 mib1185 merged commit 66b448d into master Jul 23, 2021
@mib1185 mib1185 deleted the 2fa-auth-dsm7 branch July 23, 2021 21:47
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 this pull request may close these issues.

1 participant