Giter VIP home page Giter VIP logo

Comments (5)

suzdalnitski avatar suzdalnitski commented on May 29, 2024 1

Thanks for reporting this (and the other issues you've reported!) 🙏

It's mutual, thanks for the fast response time! It's a pleasure contributing to an open-source project that is so fast to react (I really dislike contributing to open-source projects that take ages to get back).

from redwood.

jtoar avatar jtoar commented on May 29, 2024

Hey @suzdalnitski, I'm not totally sure what the issue you're facing is, but there's a detail wrong in your reproduction that's probably leading to problems.

If you want to add a new route to your web app that's accessible at http://localhost:8910/auth, you'll have to 1) add a new <Route> to the web/src/Routes.tsx file and 2) make a new page in web/src/pages (the page generator does both those things for you: yarn rw g page auth).

It looks like you've added the file to web/src/; the router won't know to pick it up there. Let me know what I'm missing though if that's not the problem!

from redwood.

suzdalnitski avatar suzdalnitski commented on May 29, 2024

Hey @jtoar, I was actually setting up authentication with Supertokens. I've ran yarn rw setup auth supertokens. It has generated auth.tsx, and has updated Routes.tsx.

You're correct, there's no auth page, because Supertokens doesn't come with a Redwood Page.

Routes has this instead:

const Routes = () => {
  if (canHandleRoute(PreBuiltUI)) {
    return getRoutingComponent(PreBuiltUI)
  }

  return (
    <Router useAuth={useAuth}>
      <Set wrap={AppLayout}>
        <Route path="/" page={HomePage} name="home" />
      </Set>

      <Route notfound page={NotFoundPage} />
    </Router>
  )
}

from redwood.

Tobbe avatar Tobbe commented on May 29, 2024

@suzdalnitski Thanks for reporting this (and the other issues you've reported!) 🙏

Do you see this issue with both yarn rw dev and yarn rw build && yarn rw serve?

Do you think you could provide a step-by-step reproduction? Preferably without involving supertokens if possible.

from redwood.

suzdalnitski avatar suzdalnitski commented on May 29, 2024

I've pushed a repo that reproduces the issue: https://github.com/suzdalnitski/redwood-auth-bug

The only things I've done were:

yarn create redwood-app test-app
yarn rw setup auth supertokens
yarn rw dev

Then I opened http://localhost:8910/auth.

from redwood.

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.