Back

[SOLVED] JWT payloads, how to manage and store JWT for authentication

  • 0
  • Flutter
  • Accounts
pandemoniun
5 Apr, 2023, 23:41

I use firebase JWT, when you logged or register, firebase callback send a JWT, you can storage the JWT in memory or database, and use to remember the user. In this payload you can easily find by decoding this JWT: userId and mail, and so many parameters. It's well documented in firebase.

I was looking for that in appwrite, some way to manager authorization and authentication by JWT, is that posible?

Thanks for the answer, if it's no posible, how we can know if the user is logged or register with out passing again and again by the login page. Is an app on android.

I don't understand well magic url's, I see using deep linking in flutter we can redirect to same places of the app, may be I have a wrong concept and need to understand better the functionality of magic urls, I prefer JWT for launching faster apps screen avoiding loging process, not needed high security level, no bank app or other types of apps with more security level

Any system of remenber user in appwrite with persistence before they close the app? Somethig to store in share preferences or BBDD locally? JWT it's great for that with the payload information if stores some data as userID, userPhoto, email and all the data that could store in this payloads

TL;DR
The user is asking about managing and storing JWT for authentication in Appwrite. They also mention using Firebase JWT as a comparison. The solution is that Appwrite SDK automatically persists the session and stores the local cookie in Flutter using path provider. There is also a discussion thread provided for further information. Additionally, the user suggests writing more examples in the documentation to help developers understand JWT and its payload management.
Drake
6 Apr, 2023, 00:17
pandemoniun
6 Apr, 2023, 09:04

I read, but documentation is so short about JWT, doesn't explain nothing about payload and how you can manage it, I think the way is testing, but I ask if there is anything more deep about it, well I will try, thank Steven, but may it's better to write examples for check them with out testing, better way to for developers to see if they can do somethigs with testing or could see if they will get what they expect in appwrite. Thanks for the info

pandemoniun
6 Apr, 2023, 09:22

Oh, sorry Steven, I didn't read in deep this document, just check JWT as firebase handle, yes, diferent way, appwrite stores local cookie in flutter writting by using path provider, it's diferent aproach for firebase, I see. Do you need to have install path provider in your flutter app and appwrite handle persistance automatically and how you can handle this session?, just that last questions

pandemoniun
6 Apr, 2023, 09:24

[SOLVED]JWT payloads, how to manage and store JWT for authentication

pandemoniun
6 Apr, 2023, 09:24

[SOLVED] JWT payloads, how to manage and store JWT for authentication

Drake
6 Apr, 2023, 13:57

The Appwrite SDK will automatically persist the session

Drake
6 Apr, 2023, 13:57
pandemoniun
6 Apr, 2023, 14:15

Thanks Steven, I resolve my doubt now, just ask for JWT because I develope things with firebase, but it's more easy way I see to persist session, just question, can delete session?, I see it's automatically, thats good, but if you want to clear after use, how to do it, for security reason in same case it will be necesary

pandemoniun
6 Apr, 2023, 14:19

Sorry Steeven, it's in documentation, thanks again

Drake
6 Apr, 2023, 14:21

No worries! One day when we have search it will be much easier to find 😅

pandemoniun
6 Apr, 2023, 14:22

Yeah, handle noob it's hard, appreciate your work

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more