Daniel Bertalan
d18edadd05
Fix 2FA login with both TOTP and U2F enabled
...
The `2FA.Enabled` field in `/auth`'s JSON output seems to be a bitmap of
some sort, as the API returns `3` when both TOTP and U2F login is on.
This commit changes some `Enabled == 1` checks to `Enabled != 0` to
handle this case properly.
Fixes #250
2023-04-14 18:48:33 +02:00
Simon Ser
0bbe26f26a
auth: add more context to errors
2022-09-10 21:49:33 +02:00
Simon Ser
fd518b533c
auth: fix re-auth 2FA error message not showing up
...
There was a confusing error message instead:
[403] Access token does not have sufficient scope
Which just meant the access token was used without completing 2FA.
2021-11-23 11:25:27 +01:00
Simon Ser
5475468321
Upgrade dependencies
2021-07-30 15:27:31 +02:00
proletarius101
0df2e43d8d
imports: change the crypto lib to new import path
2021-04-08 11:13:32 +02:00
Simon Ser
80e0fa6f3e
Fix 2FA support
...
The 2FA information is now returned after the /auth request instead of
the /auth/info one.
Closes: https://github.com/emersion/hydroxide/issues/76
2019-12-08 12:14:41 +01:00
Simon Ser
db983eed89
protonmail: fix "invalid input" error on /auth/refresh
...
It seems like we were just missing a valid RedirectURI.
References: https://github.com/emersion/hydroxide/issues/70
2019-11-14 09:12:34 +01:00
Dmitry Valter
d5a7cf4e0a
auth/auth: add refresh error 2000 hotfix
...
References: https://github.com/emersion/hydroxide/issues/70
2019-11-14 08:36:09 +01:00
Simon Ser
cc03e059b9
Save key salts after auth
...
The key salts endpoint can only be accessed right after authentication, it's
blocked after auth refresh.
Closes: https://github.com/emersion/hydroxide/issues/68
2019-08-31 17:43:49 +03:00
emersion
e6f814952d
Store everything in XDG_CONFIG_HOME, add `status` command
2019-03-22 22:35:10 +02:00
emersion
4de8f28cd6
Export RawAPIError so that encoding/json can set it, update AppVersion
2018-04-18 20:04:59 +01:00
emersion
ab599a27fa
auth: try to re-authenticate
2018-01-09 22:58:55 +01:00
emersion
480af1016a
Re-auth when access token expires
2017-09-26 18:29:13 +02:00
emersion
c6b479b01a
protonmail: add some messages + public keys endpoints
2017-09-20 10:09:31 +02:00
emersion
26817a27c7
auth: move auth stuff in this new package
2017-09-19 14:57:29 +02:00