Back

Insert jwt token as query parameter in url? Possible?

  • 0
  • Storage
  • Cloud
Mosh Ontong
18 Nov, 2023, 01:09

According to the documentation, we can insert jwt token in REST API using the headers. But I am curious that is it possible to put that jwt token in query parameters of URL?

Reason: In my case I want to access a private file from Appwrite storage. To access this it requires to have jwt token when requesting to access this file. For example, I want to stream a video file from storage. However, I currently using the video player flutter package, this package does not support to add headers on url. Hence the another solution I am thinking right now is the jwt token will be inserted on query parameters instead.

TL;DR
The user wants to know if it is possible to insert a JWT token as a query parameter in a URL. They want to access a private file from Appwrite storage and the package they are using does not support adding headers to the URL. However, inserting sensitive data like JWT tokens in query parameters is not recommended.
Drake
18 Nov, 2023, 02:50

There was plan to do something like that, but it was put on hold (and may be scrapped) because JWT tokens are sensitive and URLs are not good places to put sensitive data.

What package are you using for video player?

Drake
18 Nov, 2023, 02:54

and what platform is your app running on?

Mosh Ontong
18 Nov, 2023, 02:54

Windows platform

Drake
18 Nov, 2023, 02:55

and what package?

Mosh Ontong
18 Nov, 2023, 02:56
Drake
18 Nov, 2023, 02:59

heh...ya...

Mosh Ontong
18 Nov, 2023, 03:00

I am planning to use media kit but I do not have time, but thanks for the help.

Drake
18 Nov, 2023, 03:04

ya...media_kit sounds like a better solution

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