Comments (3)
Thanks for the report. That request should make no call to the /token endpoint though, so there must be something else going on. Would you mind providing a sample repository triggering the issue?
You can also take a look at our comprehensive react example which doesn't seem to trigger this issue:
code: https://github.com/nhost/nhost/tree/main/examples/react-apollo
website: https://react-apollo.example.nhost.io/sign-in
from nhost.
Thanks for your reply @dbarrosop. I tried to strip down my code to bare bones to isolate the issue and I think I found the cause of the problem. I was running my code locally in dev mode and I was already logged in as one of the users of my app. So, commenting out pretty much all the code from the root of my app and refreshing the browser page still produced the same error, as my user remained logged in. This made me thinking that it's got to be something to do with NhostClient
trying to make those calls to https://[my-domain].auth.eu-west-2.nhost.run/v1/token
endpoint under the hood. Fair enough, setting autoSignIn: false
on the NhostClient
constructor fixed the issue. Bare in mind that when I uncommented my log in / log out flow, I can still log in, refresh the page and my user remains logged in.
I wonder if the bug was introduced in the version of the "@nhost/react": "^3.4.2" that I'm using. In the example you provided (https://github.com/nhost/nhost/tree/main/examples/react-apollo) @nhost/react
dependency gets imported locally from the mono-repo. So I don't really know what version it is.
P.S. The example you provided still uses the react-apollo
dependency (https://github.com/nhost/react-apollo), which is deprecated on Feb 16, 2022 in favour of @nhost/apollo
, however the new package usage is not documented and there are no examples of utilising it. I had to look into its source code to understand how to use it. It would be great if you could cover that gap. Otherwise thank for the work you're doing.
from nhost.
So I don't really know what version it is.
It uses the latest one as it is rebuilt on every release.
The example you provided still uses the react-apollo
The example I provided uses @nhost/react-apollo from the same repo.
however the new package usage is not documented and there are no examples of utilising it.
As mentioned above, the example above, the reference documentation and our quickstart are all using that library.
from nhost.
Related Issues (20)
- Hasura doesn't work HOT 3
- nhost project showing 404 HOT 1
- dashboard: allow configuring postmark's native integraton
- Feature Request: Choose Embedding Model HOT 16
- Feature Request: Add OTP for Email in Auth HOT 14
- dashboard: github connect: investigate potential UX improvements HOT 2
- dashboard: multiple error toasts closing together
- Custom Claim Array always null with auth 0.29.1 HOT 5
- dashboard: add model settings to autoembeddings configuration
- dashboard: e2e tests for Run and AI pages
- Error in signup/email-password HOT 2
- Never received any otp code, response is null on session and error
- Nhost (Next) JWT Token expire and apollo/nhostNext js client stops working HOT 19
- Can't Access Auth Endpoint HOT 1
- Change metadata for user in dashboard HOT 2
- evaluate project templates
- add "headers" option to missing methods in the js sdk
- react-apollo example e2e tests backend fails to start because of dummy secrets
- NextJS Server Components and Subscriptions Example HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nhost.