Open geetparekh opened 1 month ago
@geetparekh just wondering, since we specifically require the parameter to be named token
to do the automatic validation, did you try with token
or did you have it as jwt
?
In the code, we specifically look for context.token
:
This page describes how we can validate the auth token by setting the token field in the context field. The same process however, does not work with the express middleware server that we are using.
Because of that, we had to write a custom function to validate the auth token using jsonwebtoken library:
I would be happy to contribute this to the library so that the users would not have to write such a function themselves. However, I also feel that there is a missing link or a bug somewhere in the library as the automatic token validation is there with the standalone server, but not with the express middleware server. So, wanted to bring this up and see if we can resolve it.