# Bypass /login completely when only one OAuth method?

**URL:** https://meta.discourse.org/t/bypass-login-completely-when-only-one-oauth-method/119726
**Category:** Support
**Created:** [June 7, 2019, 11:05am UTC](https://meta.discourse.org/t/bypass-login-completely-when-only-one-oauth-method/119726 "2019-06-07T11:05:18Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![theopen-institute](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/theopen-institute/32/141988_2.png) [@theopen-institute](https://meta.discourse.org/u/theopen-institute)
#### Post date: [June 7, 2019, 11:05am UTC](https://meta.discourse.org/t/bypass-login-completely-when-only-one-oauth-method/119726/1 "2019-06-07T11:05:18Z")

</div>

I’m trying to create an SSO-like experience using OAuth and the oauth2-basic plugin. Specifically, on a site that is both `login required` and without `enable local logins`, I’d like to force users directly to authentication without first routing them to `discourse.example.com/login`. Is this possible?

I’ve seen some discussion of it here:

> [@SSO vs Oauth2 difference?](https://meta.discourse.org/t/sso-vs-oauth2-difference/76543/5):
>
> 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](https://github.com/discourse/discourse-oauth2-basic) 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.

And this thread seems to suggest that it’s possible:

> [@Silent login/signup via Auth0](https://meta.discourse.org/t/silent-login-signup-via-auth0/83163):
>
> Hi I am trying to achieve SSO for the following scenario. My application authenticates users agains auth0. Once authenticated, whenever the user visits the discourse page, I expect the user to be logged in silently without having to re-enter credentials (using the credentials from the initial login to my application). Has anyone tackled this scenario? Currently i have an Auth0 rule that upon authentication re-directs to discourse via the /sso/ path, passing the sso credentials from Auth0. Th…

…but despite playing with configurations for a while my unauthenticated users are still routed to /login.

Any tips? Many thanks in advance.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [June 7, 2019, 11:11am UTC](https://meta.discourse.org/t/bypass-login-completely-when-only-one-oauth-method/119726/2 "2019-06-07T11:11:16Z")

</div>

It’s on the to-do list, but we haven’t got to it quite yet

> [@SSO vs Oauth2 difference?](https://meta.discourse.org/t/sso-vs-oauth2-difference/76543/14):
>
> I definitely want to get this improved but it is not slotted quite yet. @david do you want to [take this TODO](https://meta.discourse.org/t/sso-vs-oauth2-difference/76543/11)? Not urgent but some time in the next 6 months.

---

<div class="post-metadata">

### Author: ![theopen-institute](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/theopen-institute/32/141988_2.png) [@theopen-institute](https://meta.discourse.org/u/theopen-institute)
#### Post date: [June 7, 2019, 11:13am UTC](https://meta.discourse.org/t/bypass-login-completely-when-only-one-oauth-method/119726/3 "2019-06-07T11:13:58Z")

</div>

Great, thanks so much for clarifying.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [July 7, 2019, 11:14am UTC](https://meta.discourse.org/t/bypass-login-completely-when-only-one-oauth-method/119726/4 "2019-07-07T11:14:03Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
