mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 10:59:51 +08:00
cada172981
If the `enforce_second_factor_on_external_auth` setting
is disabled and a user logs in with an OAuth method,
they don't automatically get redirected to /preferences/second-factor
on login. However, they can get there manually, and once there
they cannot leave.
This commit fixes the issue and allows them to leave
and also does some refactors to indicate to the client
what login method is used as a followup to
0e1102b332
18 lines
461 B
Ruby
18 lines
461 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Auth
|
|
LOGIN_METHOD_OAUTH = "oauth"
|
|
LOGIN_METHOD_LOCAL = "local"
|
|
end
|
|
|
|
require "auth/auth_provider"
|
|
require "auth/result"
|
|
require "auth/authenticator"
|
|
require "auth/managed_authenticator"
|
|
require "auth/facebook_authenticator"
|
|
require "auth/github_authenticator"
|
|
require "auth/twitter_authenticator"
|
|
require "auth/linkedin_oidc_authenticator"
|
|
require "auth/google_oauth2_authenticator"
|
|
require "auth/discord_authenticator"
|