awslabs / aws-jwt-verify

JS library for verifying JWTs signed by Amazon Cognito, and any OIDC-compatible IDP that signs JWTs with RS256, RS384, RS512, ES256, ES384, and ES512
Apache License 2.0
620 stars 44 forks source link

#node-web-compat could not be found within the project or in these directories #135

Closed omartehsin1 closed 1 year ago

omartehsin1 commented 1 year ago

Question Error in my React Native project when trying to use aws-jwt-verify. I'm aware there is a potential solution from #66, but it is not working for me.

Versions Which version of aws-jwt-verify are you using? => "4.0.0"

Just for reference, I did try doing the following:

moduleNameMapper: { '#node-web-compat': "./node-web-compat-node.js", }

But this has not worked. Any help would be greatly appreciated.

ottokruse commented 1 year ago

Thanks for your interest in this library.

Alas we don't support React Native. There is more to it than just this issue that you're filing now (RN is basically a totally different JavaScript environment that doesn't support a lot of things you have in NodeJS and web)

Read the comments here to get an idea: https://github.com/awslabs/aws-jwt-verify/issues/66#issuecomment-1125229264

What's your use case for using this lib in react native? Why do you want to verify JWTs on the client? Would be great to understand the need, so we might potentially consider doing work for supporting RN