Comments (4)
- need to make hasura recognize the jwt that our server signed
- need to click on the right icons in hasura admin to allow some operations and disallow others, based on user id
- check that our server checks the jwt that our server signed
from koordinator2000.
so, the jwt method isnt possible with nhost, so, i'd probably wait for when nhost has a svelte api, and then use their autho
from koordinator2000.
koo5
:
so here's my problem: i have a fairly nonstandard idea about how authentication should work in my app. Any browser that comes to the website, my js code make a call to my node backend, which generates a user id, signs a jwt with that id, and sends it back. The token is saved in browser localstorage. As long as the user doesn't delete it or something, they are in possession of it. If they use the site for some time, it nags them to authenticate with google/whatever. When they do, i save the association into the db, so that at a later time, when they authenticate again, my backend finds this association and signs a jwt again, effectively logging the original user in. When i used hasura.io and auth0, i could do this (it's not fully implemented but principially i think), because hasura.io lets me specify the pubkey that hasura would use to verify tokens - i'd set it to correspond to the privkey that my node backend has.
[
7:35 PM
]
koo5
:
so.. (sorry for the word salad), does this sound like a scenario that the nhost auth api could support?
[
7:35 PM
]
elitan
:
@koo5 Yea we support that out of the box
[
7:36 PM
]
elitan
:
Do you have any specific issue? What frontend framework do you use?
[
7:36 PM
]
elitan
:
You might be interested in: https://github.com/nhost/nhost/tree/main/examples
[
7:42 PM
]
koo5
:
@elitan oh, gotta admit, i haven't studied the examples. All of them do this, localstorage and everything? I use svelte.
[
8:00 PM
]
koo5
:
ok, i see nhostRefreshToken, so far so good
[
8:01 PM
]
koo5
:
i guess i'd have to call the registration endpoint with some dummy email/username/password though?
[
8:04 PM
]
elitan
:
Yes
from koordinator2000.
POC /login done.
now if we could tell nhost to redirect to the original url rather than having to have a fixed one in settings
another option is i guess to spawn a second, dev, nhost project, for localhost testing
from koordinator2000.
Related Issues (20)
- let users leave a note, with their participation, show it in the table HOT 1
- slugs for /campaign/ urls
- fix ??? in participants count HOT 2
- optional multi-column layout? HOT 1
- https://github.com/sveltejs/sapper-template/issues/188 HOT 2
- matcher script should be rewritten to use graphql subscriptions (but it could be kinda tricky?) HOT 2
- node-matcher/untitled2 HOT 1
- break up user store into one store for each property HOT 1
- nag people to link social accounts / enter their email / agree to newsletter / .. HOT 4
- campaigns: attach sets of locations/areas, for user-location-aware sorting
- send out emails HOT 1
- db connection error message HOT 2
- indication of current user
- pagination / filtering / sorting HOT 1
- twitter integration HOT 3
- ideas for more compact as well as more self-explaining UI designs ..
- migrate to pure client-side(?) HOT 1
- investigate slow rendering
- netlify build doesn't have any routes
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 koordinator2000.