Commit Graph

8 Commits (aa662cecada500b57d8959f311a2a74e41e6211a)

Author SHA1 Message Date
Matt Jankowski 268dd32d76 Auth sign out ()
* Add a spec for signing out

* Add spec showing that suspended user gets a 403 forbidden on sign out

* Allow suspended account users to sign out
Matt Jankowski b48f2cbc8b Catch error when server decryption fails on 2FA ()
alpaca-tc 9317ec8eb1 Localize with i18n for Devise::FailureApp ()
This PR fixes I18n.locale for rake middlewares. Mastodon uses Devise that depends on Warden.
Warden::Manager can be found in rake middleware. It is outside of the controller.

In the case of authentication failed, warden calls throw(:warden). At the time Warden::Manager
delegates request to failure_app to generate response and flash[:alert] after catching it.
Unfortunately, I18n.locale is already reset then because I18n.with_locale is enabled only
inside the controller. If we used I18n.locale=, Devise::FailureApp could get the current locale.
Patrick Figel df4ff9a8e1 Add recovery code support for two-factor auth ()
* Add recovery code support for two-factor auth

When users enable two-factor auth, the app now generates ten
single-use recovery codes. Users are encouraged to print the codes
and store them in a safe place.

The two-factor prompt during login now accepts both OTP codes and
recovery codes.

The two-factor settings UI allows users to regenerated lost
recovery codes. Users who have set up two-factor auth prior to
this feature being added can use it to generate recovery codes
for the first time.

Fixes  and fixes 

* Set OTP_SECRET in test enviroment

* add missing .html to view file names
Eugen Rochko 7ac574d9a9 Fix - Devise mailer fixed, test spec added so it won't slip past again
Eugen Rochko 7e14eefc81 Replace logo, fix - delete/unreblog/unfavourite API, fix - app
registration API
Eugen Rochko 10ba09f546 Upgrade to Rails 5.0.0.1
Eugen Rochko ff2cbc0753 Remember me enabled by default