david
(David Taylor)
Abril 7, 2021, 9:10am
2
rodypl:
Você sabe como, quando um usuário tenta fazer login ou criar uma conta, ele é apresentado aos campos de e-mail e senha, mas à direita disso, são oferecidas opções para fazer login com Facebook, Google, etc? Eu poderia simplesmente ter a conta do meu site como uma dessas opções à direita?
Depende do que você quer dizer com “SSO”:
Se você está falando de Setup DiscourseConnect - Official Single-Sign-On for Discourse (sso) , então você não pode usá-lo junto com outras opções de login.
Se você está falando de OAuth2, OpenID Connect ou qualquer um dos nossos outros plugins de autenticação, então sim, eles podem ser usados juntos e também com o login por e-mail e senha.
Boas notícias nesse aspecto: adicionamos recentemente suporte a convites para o DiscourseConnect .
committed 12:20AM - 19 Mar 21 UTC
This PR allows invitations to be used when the DiscourseConnect SSO is enabled f… or a site (`enable_discourse_connect`) and local logins are disabled. Previously invites could not be accepted with SSO enabled simply because we did not have the code paths to handle that logic.
The invitation methods that are supported include:
* Inviting people to groups via email address
* Inviting people to topics via email address
* Using invitation links generated by the Invite Users UI in the /my/invited/pending route
The flow works like this:
1. User visits an invite URL
2. The normal invitation validations (redemptions/expiry) happen at that point
3. We store the invite key in a secure session
4. The user clicks "Accept Invitation and Continue" (see below)
5. The user is redirected to /session/sso then to the SSO provider URL then back to /session/sso_login
6. We retrieve the invite based on the invite key in secure session. We revalidate the invitation. We show an error to the user if it is not valid. An additional check here for invites with an email specified is to check the SSO email matches the invite email
7. If the invite is OK we create the user via the normal SSO methods
8. We redeem the invite and activate the user. We clear the invite key in secure session.
9. If the invite had a topic we redirect the user there, otherwise we redirect to /
Note that we decided for SSO-based invites the `must_approve_users` site setting is ignored, because the invite is a form of pre-approval, and because regular non-staff users cannot send out email invites or generally invite to the forum in this case.
Also deletes some group invite checks as per https://github.com/discourse/discourse/pull/12353
E para outros métodos de login:
committed 01:27AM - 09 Mar 21 UTC
Essas alterações estão disponíveis na versão mais recente do Discourse.
4 curtidas