• Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login
FusionAuth
  • Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login

NestJS and FusionAuth

Scheduled Pinned Locked Moved
Q&A
nestjs passportjs
0
4
2.5k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    dan
    last edited by 29 Mar 2021, 13:41

    I want to use NestJS and FusionAuth together. How can I do so?

    --
    FusionAuth - Auth for devs, built by devs.
    https://fusionauth.io

    1 Reply Last reply Reply Quote 0
    • D
      dan
      last edited by 29 Mar 2021, 13:42

      As far as NestJS, I am no expert, but I took a brief look and if I were in your shoes, I'd probably try the passport OIDC strategy.

      https://docs.nestjs.com/security/authentication
      https://www.npmjs.com/package/passport-oidc-strategy

      --
      FusionAuth - Auth for devs, built by devs.
      https://fusionauth.io

      1 Reply Last reply Reply Quote 0
      • P
        psmiddy
        last edited by 29 Mar 2021, 22:38

        I am only new to this but could you not use the typescript client?

        The passport-oidc-strategy seems abandoned.

        There is this but there is no documentation:
        https://github.com/mdwagner/next-great-idea/tree/master/nestjs

        There are many guides on how to use Okta with NestJS such as

        • https://developer.okta.com/blog/2020/02/26/build-a-secure-nestjs-api-with-postgres

        • https://www.youtube.com/watch?v=6PJbHtBXRxQ

        • https://okta-blog.netlify.app/blog/2021/02/22/first-nestjs-application

        • https://slacker.ro/2021/03/15/build-a-secure-nestjs-back-end-for-your-react-application/

        Even if FusionAuth is a better product, it just seems a lot easier to find information on Okta.

        I had the same problem with https://www.ory.sh/ I just could not find any guides on how to integrate it.

        1 Reply Last reply Reply Quote 0
        • D
          dan
          last edited by 30 Mar 2021, 03:01

          Huh, yeah, that is weird. Not sure why there isn't a solid OIDC implementation for passportjs.

          You could use the FusionAuth typescript client. It's open source; here's the github repo.

          FusionAuth should be OIDC compliant so any NestJS example application that works with OIDC should be fine. Here are some posts to review:

          • https://sdoxsee.github.io/blog/2020/02/05/cats-nest-nestjs-mongo-oidc.html#add-oidcstrategy
          • https://github.com/Finastra/finastra-nodejs-libs/tree/develop/libs/oidc
          • https://github.com/panva/node-oidc-provider (a node OIDC provider)

          As for why you might want to avoid okta, I would just advise looking at the pricing page before committing. 🙂

          --
          FusionAuth - Auth for devs, built by devs.
          https://fusionauth.io

          1 Reply Last reply Reply Quote 1
          3 out of 4
          • First post
            3/4
            Last post