Skip to content

Support For Verifying JWT Token using the Server API #511

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ereio opened this issue Aug 23, 2020 · 10 comments
Closed

Support For Verifying JWT Token using the Server API #511

ereio opened this issue Aug 23, 2020 · 10 comments
Labels
backlog Issues waiting in the backlog enhancement New feature or request

Comments

@ereio
Copy link

ereio commented Aug 23, 2020

I can extract the token from the x-fallback-cookie in headers for the client, but there's no way to validate these access tokens in the node sdk. If you allow the node-appwrite getSessions query to include each sessions access token, one could authenticate custom endpoints through our own backends and still use the same authentication platform through appwrite.

A common pattern I use when developing backends is to create a proxy graphql server as an abstraction for every service available. When doing this, I don't want to roll my own authentication each time as it's a liability, but I want to abstract it in case I need to switch auth providers in the future. Firebase allows you to verify tokens using their node sdk and thus check the token being passed by the user in the headers.

Let me know if this makes sense, if you want further clarification, or if I'm missing something here.

Thanks for all your hard work!

@ereio ereio changed the title Support For Token Based Authentication Support For Verifying Token In Node SDK Aug 23, 2020
@ereio
Copy link
Author

ereio commented Aug 23, 2020

Here's a link to the equivalent in firebase: https://firebase.google.com/docs/auth/admin/verify-id-tokens

@eldadfux
Copy link
Member

@ereio Would a JWT implementation (https://jwt.io/) in the Appwrite users/account APIs help you accomplish this use case?

@eldadfux eldadfux added the enhancement New feature or request label Aug 24, 2020
@ereio
Copy link
Author

ereio commented Aug 24, 2020

yes, that would be great

@eldadfux eldadfux changed the title Support For Verifying Token In Node SDK Support For Verifying JWT Token using the Server API Aug 24, 2020
@eldadfux
Copy link
Member

Added this feature request to our roadmap

@punitdiwan
Copy link

I always wanted to have this JWT auth in addition to cookie based auth. Its way easier to manage the JWT token from Local Storage. I am excited to learn that it is being implemented. Moreover, its equally secure as cookie based auth.

@eldadfux
Copy link
Member

JWT draft PR is ready: https://github.com/appwrite/appwrite/pull/784/files 🎉

@eldadfux
Copy link
Member

JWT is available in a closed beta, if anyone wants to try it please reach me on Discord.

@eldadfux eldadfux added the waiting for release Fixed or implemented and waiting for a new version to be released label Mar 20, 2021
@TorstenDittmann
Copy link
Contributor

This got fixed with https://github.com/appwrite/appwrite/releases/tag/0.8.0 👏🏻

@jdub113113
Copy link

Help me

@jdub113113
Copy link

[email protected]

@eldadfux eldadfux removed the waiting for release Fixed or implemented and waiting for a new version to be released label Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Issues waiting in the backlog enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants