# Locked myself out of Discourse

**URL:** <https://community.auth0.com/t/locked-myself-out-of-discourse/71316>\
**Category:** Get Help\
**Created:** [October 14, 2021, 1:05pm UTC](https://community.auth0.com/t/locked-myself-out-of-discourse/71316 "2021-10-14T13:05:48Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![devteam2](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/devteam2/32/12814_2.png) [@devteam2](https://community.auth0.com/u/devteam2)\
**Post date:** [October 14, 2021, 1:05pm UTC](https://community.auth0.com/t/locked-myself-out-of-discourse/71316/1 "2021-10-14T13:05:48Z")

</div>

I’ve turned off Discourse login and routed all logins through Auth0. For the users that registered through Discourse even I try to match them up with the password on Auth0 it still asks them to sign up for a new account and says the email address is taken. Any ideas?  
Would also welcome suggestions on how to turn on Discourse login while I figure this out.  
Cheers,  
C

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [October 14, 2021, 7:52pm UTC](https://community.auth0.com/t/locked-myself-out-of-discourse/71316/3 "2021-10-14T19:52:06Z")

</div>

Hi @devteam2,

Are you unable to get to the admin dashboard of your discourse instance? Can you share exactly what settings you have changed that led to this? In addition, I highly recommend using a staging environment when making these types of changes in the future.

It might be worth posting this on [meta.discourse.org](http://meta.discourse.org) as well.

---

<div class="post-metadata">

**Author:** ![devteam2](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/devteam2/32/12814_2.png) [@devteam2](https://community.auth0.com/u/devteam2)\
**Post date:** [October 15, 2021, 10:58am UTC](https://community.auth0.com/t/locked-myself-out-of-discourse/71316/4 "2021-10-15T10:58:08Z")

</div>

I’m unable to access the admin dashboard but I should still be able to access the database and SSH to the backend.

---

<div class="post-metadata">

**Author:** ![devteam2](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/devteam2/32/12814_2.png) [@devteam2](https://community.auth0.com/u/devteam2)\
**Post date:** [October 15, 2021, 11:17am UTC](https://community.auth0.com/t/locked-myself-out-of-discourse/71316/5 "2021-10-15T11:17:55Z")

</div>

I got a result on [meta.discourse.org](http://meta.discourse.org) so thanks for the tip. Simply had to append the line below to the url and it emailed a magic link [Locked myself out of Discourse - support - Discourse Meta](https://meta.discourse.org/t/locked-myself-out-of-discourse/206130?u=cokestroke)

I’m just wondering if I’ve set it all up right. If I’m redirecting people to Auth0, to sign up, why are they still required to create an account on Discourse and the fields aren’t being carried across.  
That’s another topic right there

```auto
u/admin-login
```

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [October 15, 2021, 3:48pm UTC](https://community.auth0.com/t/locked-myself-out-of-discourse/71316/6 "2021-10-15T15:48:26Z")

</div>

> [@devteam2](#):
>
> If I’m redirecting people to Auth0, to sign up, why are they still required to create an account on Discourse and the fields aren’t being carried across.

Discourse requires some information in addition to Auth0. We have the user login through Auth0 and continue to signup with a discourse profile.

---

<div class="post-metadata">

**Author:** ![devteam2](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/devteam2/32/12814_2.png) [@devteam2](https://community.auth0.com/u/devteam2)\
**Post date:** [October 15, 2021, 3:58pm UTC](https://community.auth0.com/t/locked-myself-out-of-discourse/71316/7 "2021-10-15T15:58:07Z")

</div>

Sorry what I meant was login not sign up. So I’ve imported users into Auth0, will I need to import them into Discourse so they aren’t prompted to create an account? Will the authentication work then?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [October 15, 2021, 4:47pm UTC](https://community.auth0.com/t/locked-myself-out-of-discourse/71316/8 "2021-10-15T16:47:28Z")

</div>

How we have it set up, users click the login button on discourse, then they are redirected to the Auth0 login page and after successful authentication, they are returned to discourse where they are prompted to create their discourse account/profile.

Can you provide more information about how your setup differs? At this point, it might be helpful to add some screenshots or a quick video of how your login currently works.

---

<div class="post-metadata">

**Author:** ![devteam2](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/devteam2/32/12814_2.png) [@devteam2](https://community.auth0.com/u/devteam2)\
**Post date:** [October 18, 2021, 12:48pm UTC](https://community.auth0.com/t/locked-myself-out-of-discourse/71316/9 "2021-10-18T12:48:39Z")

</div>

So I’ve imported users into Auth0 with their password. I’ve also imported them into Discourse using the same password. The idea is that when they click on the login with Auth0 the Auth0 login pops up and matches them to the details in the Discourse platform without them having to set up a new account.  
When I try this approach I get the setup account instead of 'you’ve been logged in" The attached skips the Auth0 login box because I had previously tried logging in that way. So Auth0 remembers but DIscourse doesn’t know who I am.

 ![Screenshot 2021-10-18 at 13.47.54](https://global.discourse-cdn.com/auth0/original/3X/4/7/47fd8d7c98c4d77d6c1ad10aaadf269bfa1aa279.jpeg)  
 ![Screenshot 2021-10-18 at 13.48.09](https://global.discourse-cdn.com/auth0/original/3X/d/3/d3133ae55e75b232a9883a88c20f4c2ac60e75d4.jpeg)

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [October 18, 2021, 5:01pm UTC](https://community.auth0.com/t/locked-myself-out-of-discourse/71316/10 "2021-10-18T17:01:31Z")

</div>

I think the typical setup has users authenticate via Auth0 (and it sounds like this is working), then register in discourse as you describe.

I’m not sure how you would go about importing all the users into discourse and skipping the initial registration. I think this question is probably best handled at [meta.discourse.org](http://meta.discourse.org) as it is specific to their platform and is occurring post-authentication. Have you looked through this thread:

> **[Configure sign up and log in with Auth0 using the OAuth2 Basic Plugin](https://meta.discourse.org/t/configure-sign-up-and-log-in-with-auth0-using-the-oauth2-basic-plugin/64633)**
>
> If you are using Auth0 as your identity provider this guide will show you how to setup authentication using the Discourse OAuth2 Basic Plugin. Initial Steps Create an Auth0 account if you don’t already have one Install the Discourse OAuth2 Basic...

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [December 23, 2021, 5:02pm UTC](https://community.auth0.com/t/locked-myself-out-of-discourse/71316/11 "2021-12-23T17:02:01Z")

</div>

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