GitHub login link fails with loopback error

Hey all, maybe someone can help me get around this login error. I have followed the directions listed here: How to Log in To your local instance of Free Code Camp to generate a GitHub clientId and client secret. I am seeing a loopback error w/ error 500 Error: user identity account not found. I have also commented out the unused providers in passport-providers.js and that does not help either.

1 Like

The problem is that an account must already exist before you can attach your Github. You cannot create a brand new account from Github alone (which is unfortunate). This means you must create your account via email first, then attach your Github. Thereafter you can login with Github. But there’s a catch, as I’m sure you are aware. You cannot create an account locally via email because it errors out since AWS is not setup locally (and no emails can be sent). The repo is in a very bad spot for new contributors.

Here’s my solution (which I’ve pitched in and hope to have merged in soon if everyone agrees).

  1. You need to setup MailHog
  2. Create the following file: freeCodeCamp/server/datasources.development.js
  3. Place the following in datasources.development.js
module.exports = {
    mail: {
        connector: 'mail',
        transport: {
            type: "smtp",
            host: "",
            secure: false,
            port: 1025,
            tls: {
                rejectUnauthorized: false
        auth: {
            user: "test",
            pass: "test"

You will probably have to update the host to “localhost”. I’m using Docker which assigns the IP above. Once you’ve done the following steps, you should be able to create an account via email. Let me know if you get stuck on any of this.