Commit Graph

14 Commits (44a3d97eb05aebb3d8ca392b4f0a1ae4850d53c1)

Author SHA1 Message Date
Eugen Rochko 72a8ca84e0 Add force_login option to OAuth authorize page ()
* Add force_login option to OAuth authorize page

For when a user needs to sign into an app from multiple accounts
on the same server

* When logging out from modal header, redirect back after re-login
2018-09-09 04:10:44 +02:00
Yamagishi Kazutoshi 7da649efb4 Use raw status code on have_http_status () 2018-04-21 21:35:07 +02:00
Alexander 8a9da4c414 update gem, test pam authentication ()
* update gem, test pam authentication

* add description for test parameters

* fix inclusion of optional group
2018-04-11 21:40:38 +02:00
Eugen Rochko fd69694749 Add "signed in as" header to some pages () 2017-08-05 04:24:58 +02:00
René Klačan ecdf17a2d7 Make sure email is case insensitive on all places ()
When case insensitivity is enabled via devise's `config.case_insensitive_keys` then `.find_for_authentication` method needs to be used instead of `.find_by` because second mentioned returns `nil` when valid email with different cases is passed.

More info https://github.com/plataformatec/devise/wiki/How-To:-Use-case-insensitive-emails
2017-06-11 02:29:08 +02:00
Akinori MUSHA 8a5d3b2e5d Go to root after login in single user mode ()
In single user mode, visitors are redirected to the single user's
profile page.  So, if you are the owner without a session, you start
from that page, click the login button and authenticate yourself
expecting you'll soon get started with the home page, but in reality
you'll get redirected back to where you started from -- your own
profile page.

This fixes the behavior by redirecting you home after login if you
have started from your own profile page.
2017-05-26 14:14:03 +02:00
Matt Jankowski 129e06f0b3 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
2017-05-02 23:37:58 +02:00
Matt Jankowski b17d7a1f85 Catch error when server decryption fails on 2FA () 2017-04-27 15:18:21 +02:00
alpaca-tc 31d49716c6 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.
2017-04-25 15:06:41 +02:00
Patrick Figel 15b393201e 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
2017-04-15 13:26:03 +02:00
Eugen Rochko 08ed85b3cf Fix - Devise mailer fixed, test spec added so it won't slip past again 2016-11-17 12:29:11 +01:00
Eugen Rochko 7e14eefc81 Replace logo, fix - delete/unreblog/unfavourite API, fix - app
registration API
2016-09-26 23:56:53 +02:00
Eugen Rochko 10ba09f546 Upgrade to Rails 5.0.0.1 2016-08-17 17:58:00 +02:00
Eugen Rochko ff2cbc0753 Remember me enabled by default 2016-03-28 00:06:52 +02:00