Back

create jwt takes no params?

  • 0
  • Accounts
  • Web
firestorm
5 Jun, 2023, 17:32

i mean it should store data right like name and email so shouldnt we be able to add other data like maybe nickname

TL;DR
Title: JWT creation without params; Can't fetch and add additional data like name or email. Unfortunately, creating a JWT without params is not possible. The JWT only contains the userId, $id, and $createdAt. You cannot access the JWT_SECRET or add additional data like name or email.
otik
5 Jun, 2023, 17:33

no you are accually not able to do it, you cant even know JWT_SECRET

otik
5 Jun, 2023, 17:33

in JWT is only userId of user and $id and $createdAt

firestorm
5 Jun, 2023, 17:35

ok so now imagine i log in using create email session and as jwt takes no params im assuming there is some way that it fetches the email id and returns the userid am i correct?

otik
5 Jun, 2023, 17:36

yes, you send your session with fetch and then you gen JWT with userId

otik
5 Jun, 2023, 17:37

Appwrite will get your userId from session

Sandeep K. Dasari
10 Jun, 2023, 09:49

Explain me this with an example sir.

animeyeet
10 Jun, 2023, 10:59

jwt has already your userId

firestorm
12 Jun, 2023, 13:04

Thank you @otik and @animeyeet

animeyeet
14 Jun, 2023, 20:51

anything for @firestorm

animeyeet
14 Jun, 2023, 20:52

mark it as solved!

firestorm
16 Jun, 2023, 17:19

No no yea ill mark it

firestorm
16 Jun, 2023, 17:19

Just figuring out how

firestorm
16 Jun, 2023, 17:20

How do i make it as solved? πŸ’€

Drake
16 Jun, 2023, 17:27

edit post and add [SOLVED] to the beginning of the title

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