Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Error: Unknown authentication strategy "local" #102

@santekotturi

Description

@santekotturi

When running the app as cloned, I got Error: Unknown authentication strategy "local" from

controllers/user.ts line 41:
passport.authenticate("local", ...

I remedied it by importing the configured passport instance from config/passport.ts.

Added export default passport; to the end of config/passport.ts so that I could import it in controllers/user.ts

import { default as passport } from '../config/passport'

I'm curious, I presume the error is because I'm doing something wrong, just not sure what ¯_(ツ)_/¯

[EDIT] also had to add app.use(passport.initialize()); to app.ts 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions