Devographics / Monorepo

Monorepo containing the State of JS apps
surveyform-sigma.vercel.app
Other
131 stars 52 forks source link

fix: survey crash on unauthenticed user #160

Closed kacperkapusciak closed 1 year ago

kacperkapusciak commented 1 year ago

Hi 👋

During testing I've discovered a very easily reproductible app crash in the stateof* family of surverys and I've decided to help out 😅

Steps to reproduce

Video

https://user-images.githubusercontent.com/39658211/205077282-65c7556b-34fd-4b73-b24f-b3eec5842797.mov

Proposed solution

Redirect user to login page when no userId found on .

netlify[bot] commented 1 year ago

Deploy request for stateofcss2021 rejected.

Name Link
Latest commit 08a17fbf9b6ce236cab150e2c27f45e4443b045e
netlify[bot] commented 1 year ago

Deploy request for stateofcss2022 rejected.

Name Link
Latest commit 08a17fbf9b6ce236cab150e2c27f45e4443b045e
netlify[bot] commented 1 year ago

Deploy request for stateofjs2021 rejected.

Name Link
Latest commit 08a17fbf9b6ce236cab150e2c27f45e4443b045e
netlify[bot] commented 1 year ago

Deploy Preview for devographics-static failed.

Name Link
Latest commit 08a17fbf9b6ce236cab150e2c27f45e4443b045e
Latest deploy log https://app.netlify.com/sites/devographics-static/deploys/6388b9457bb6a300094c6e32
netlify[bot] commented 1 year ago

Deploy Preview for candid-boba-3aae14 failed.

Name Link
Latest commit 08a17fbf9b6ce236cab150e2c27f45e4443b045e
Latest deploy log https://app.netlify.com/sites/candid-boba-3aae14/deploys/6388b9451411680008ef09cb
netlify[bot] commented 1 year ago

Deploy Preview for graphiql-devographics failed.

Name Link
Latest commit 08a17fbf9b6ce236cab150e2c27f45e4443b045e
Latest deploy log https://app.netlify.com/sites/graphiql-devographics/deploys/6388b9450958630008d02145
netlify[bot] commented 1 year ago

Deploy Preview for stateofcss failed.

Name Link
Latest commit 08a17fbf9b6ce236cab150e2c27f45e4443b045e
Latest deploy log https://app.netlify.com/sites/stateofcss/deploys/6388b945d541b500082e9cf6
netlify[bot] commented 1 year ago

Deploy Preview for state-of-graphql failed.

Name Link
Latest commit 08a17fbf9b6ce236cab150e2c27f45e4443b045e
Latest deploy log https://app.netlify.com/sites/state-of-graphql/deploys/6388b94559881400099a6514
netlify[bot] commented 1 year ago

Deploy Preview for stateofjs failed.

Name Link
Latest commit 08a17fbf9b6ce236cab150e2c27f45e4443b045e
Latest deploy log https://app.netlify.com/sites/stateofjs/deploys/6388b9452713a30009dc3c3e
netlify[bot] commented 1 year ago

Deploy Preview for devographics-graphiql-internal failed.

Name Link
Latest commit 08a17fbf9b6ce236cab150e2c27f45e4443b045e
Latest deploy log https://app.netlify.com/sites/devographics-graphiql-internal/deploys/6388b945090c780008924fe0
vercel[bot] commented 1 year ago

@kacperkapusciak is attempting to deploy a commit to the Devographics Team on Vercel.

A member of the Team first needs to authorize it.

eric-burel commented 1 year ago

Hey @kacperkapusciak awesome contrib! I think it explains an Error I've seen in Sentry, thanks for catching that. Note that "useUser" takes a redirectTo parameter that should do that already (also Next 13 slightly changes the logic so I'll check at which step we should redirect people in this scenario).

eric-burel commented 1 year ago

In current version this doesn't happen anymore, thanks for pointing out this issue!