Giter Site home page Giter Site logo

Comments (3)

geelen avatar geelen commented on July 28, 2024

Hi @awthwathje, sorry for the delay in getting back to you, did you manage to get this working at all?

We've had problems with Next plugins in the past: #258

Basically, the whole NextJS ecosystem assumes a full NodeJS runtime, so plugins are usually incompatible with FABs. In this case I think we do need to compile crypto since the NodeJS one isn't accessible within a FAB. I might be wrong, but maybe we can add a browser-compatible crypto shim to this section https://github.com/fab-spec/fab/blob/master/packages/input-nextjs/src/build.ts#L107-L113 ?

How easy is this to reproduce? Does it occur as soon as you spin up a fresh NextJS app and add @auth0/next-auth0?

from fab.

loklaan avatar loklaan commented on July 28, 2024

I spent a few hours today trying to get @auth0/next-auth0 working. I almost got it there by:

  • Adding to shims in input-nextjs/src/build.ts for more native modules (dns, http2, tls)
  • Patching the crypto-browserify package with missing crypto exports (generateKeyPair, generateKeyPairSync stub, getCurves).

I ended up giving up on dynamic nextjs 😅, and instead will be just writing dynamic behaviours into custom FAB plugins, because my server.js ended up being over 10mb (unrelated). Thought it might be worth mentioning the above specifics for the next (lol) person though!

from fab.

awthwathje avatar awthwathje commented on July 28, 2024

Hi @awthwathje, sorry for the delay in getting back to you, did you manage to get this working at all?

No, I didn't and the Auth0 SDK had changed recently, and this particular issue is gone now. But it depends on Node.js API and since Workers aren't yet Node.js-compatible, I'm looking for another server-side auth integration.

from fab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.