SSO vs Oauth2 difference?

Hello

I’m working on a website with django CMS.
I would like to link the user accounts of my site to discourse.

In the first sept, I wish understand the différence between
SSO and Oauth2 I thought it was the same thing, but there are two tools, so it can’t be the same thing.
Thanks

SSO, when activated will be the only way to log in.

oAuth2 can be one of the login methods, like having the option to login with oAuth2 and Facebook and local password.

SSO also provides more functionality, like receiving bios, avatars, group membership, etc.

Jumping in as I also need some clarifications about this.

Is there any way I can enable SSO with OAuth2? My identity provider has all the configuration to set up OAuth2, like oauth2 client id, oauth2 client secret, oauth2 authorize url, oauth2 token url, oauth2 user json url, information paths to the correspondent piece of data in the returned json. But I can’t seem to enable SSO to rely on OAuth2.

Thanks!

I believe we had a customer with a single oAuth 2 provider, so we forced it through rather than making the user pick from a menu of .. one item .. as I recall @sam worked on it but I may be mistaken.

Yeah if there is only one way to login we bypass a screen so you don’t have to “click” and then “click” when logging in.

Our default GitHub - discourse/discourse-oauth2-basic: A basic OAuth2 plugin for use with Discourse · GitHub supports a lot of stuff, but is not as rich as SSO. So it depends on how much information you want to drive from oAuth2.

If basic is not good enough you will need to build another custom plugin to fish out the rest of the fields or do a PR to our official basic plugin.

Thanks for the explanation.

I would very much like to see how can I bypass the unnecessary screen if the code is available somewhere.

Anyway, between this and Login to Discourse with custom Oauth2 provider - #22 by supermathie answer, I think I have a clear path now. Feel free to continue asking @remy_dev if is not enough for you :slight_smile:

Thanks again!

i.e. if you disable ALL other authentication methods except one, that should happen. Don’t forget “Local Login”!

Ah right! When login in that happens, I kept thinking about creating a user, which after OAuth2 comes a user creation dialogs shows up. I guess I want the SSO flow as ideally, the user should not need to create an account again.

I will need to see what can I do. Auth0, the identity provider I use, does not seem to have a clear path to hook up SSO in a straightforward way.

Thanks again, again :stuck_out_tongue:

Have you seen:

https://github.com/auth0/discourse-plugin

Definitely tried it: Customize login modal · Issue #20 · auth0/discourse-plugin · GitHub. :+1:

One big difference that bothers me is:

  • When using SSO, and login required if you go to the forum home, the login process starts automatically.

  • If you have only one oAuth2 login method, and login required, navigating to the forum home displays a page asking you to log in.

Interesting, yeah that is a bug with login required that we should fix

Great summary! This is exactly what I hope to resolve as well.

@Falco / @sam are you aware of any updates on this?

I definitely want to get this improved but it is not slotted quite yet. @david do you want to take this TODO? Not urgent but some time in the next 6 months.

I will probably attempt to workaround this for now by refreshing GitHub - ComputerScienceHouse/discourse-oidc: OpenID Connect Bridge for Discourse SSO · GitHub.

Also, something I’m missing for OAuth2 / OIDC as compared to SSO is the ability to utilize group information. If I get to make the bridge, ill add that ability in the bridge by passing such info along.

@sam 이 문제에 대해 업데이트가 있나요? 로그인 방법이 하나뿐인데도, 포럼에 접근하려면 여전히 로그인 버튼을 클릭해야 하는 것 같습니다. SSO가 대안이 될 수 있지만, 인프라에 추가 계층이 필요하고 복잡성이 증가하므로, 이 방식을 채택할지 고민 중입니다.

아직 없지만, 구현할 목록에는 올려져 있습니다. 이번 주에 한번 확인해서 얼마나 작업이 필요한지 파악해 보겠습니다.

이제 구현되었습니다:

외부 인증기가 하나만 활성화되어 있고 또한 로컬 로그인이 비활성화되어 있으며 또한 사이트에서 로그인이 필수인 경우, 사용자는 바로 외부 인증 페이지로 이동됩니다. 이는 저희 Discourse 네이티브 SSO 구현과 정확히 일치합니다.

이 기능을 원치 않을 이유가 떠오르지 않아, 이제 이것이 기본 동작이 되었습니다.

cc @consideRatio @Joralf